diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/AutomationRepository.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/AutomationRepository.java index b874146..afdfab3 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/AutomationRepository.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/AutomationRepository.java @@ -7,9 +7,9 @@ import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.query.Param; public interface AutomationRepository extends CrudRepository { - @EntityGraph(attributePaths = {"scenes", "triggers"}) + @EntityGraph(attributePaths = {"scenes", "triggers", "conditions"}) List findAllByUserId(@Param("userId") long userId); - @EntityGraph(attributePaths = {"scenes", "triggers"}) + @EntityGraph(attributePaths = {"scenes", "triggers", "conditions"}) Optional findByIdAndUserId(@Param("id") long id, @Param("userId") long userId); }