fix in automation repo
This commit is contained in:
parent
628edfd76f
commit
a24b30ce19
1 changed files with 2 additions and 2 deletions
|
@ -7,9 +7,9 @@ import org.springframework.data.repository.CrudRepository;
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
public interface AutomationRepository extends CrudRepository<Automation, Long> {
|
public interface AutomationRepository extends CrudRepository<Automation, Long> {
|
||||||
@EntityGraph(attributePaths = {"scenes", "triggers"})
|
@EntityGraph(attributePaths = {"scenes", "triggers", "conditions"})
|
||||||
List<Automation> findAllByUserId(@Param("userId") long userId);
|
List<Automation> findAllByUserId(@Param("userId") long userId);
|
||||||
|
|
||||||
@EntityGraph(attributePaths = {"scenes", "triggers"})
|
@EntityGraph(attributePaths = {"scenes", "triggers", "conditions"})
|
||||||
Optional<Automation> findByIdAndUserId(@Param("id") long id, @Param("userId") long userId);
|
Optional<Automation> findByIdAndUserId(@Param("id") long id, @Param("userId") long userId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue