fix query
This commit is contained in:
parent
ad989c6dea
commit
aae86b94b5
@ -33,9 +33,9 @@ interface EventRepository extends JpaRepository<Event, Integer> {
|
|||||||
|
|
||||||
List<Event> findAllByTask(Task task);
|
List<Event> findAllByTask(Task task);
|
||||||
|
|
||||||
@Query("SELECT e FROM Event e WHERE e.recipients = :user ORDER BY e.executeDate")
|
@Query("SELECT e FROM Event e WHERE (:user MEMBER OF e.recipients) ORDER BY e.executeDate")
|
||||||
Page<Event> findByUser(Pageable offsetablePageRequest, @Param("user") User user);
|
Page<Event> findByUser(Pageable offsetablePageRequest, @Param("user") User user);
|
||||||
|
|
||||||
@Query("SELECT e FROM Event e WHERE e.recipients = :user AND e.executeDate > CURRENT_DATE ORDER BY e.executeDate")
|
@Query("SELECT e FROM Event e WHERE (:user MEMBER OF e.recipients) AND e.executeDate > CURRENT_DATE ORDER BY e.executeDate")
|
||||||
Page<Event> findUserFuture(Pageable offsetablePageRequest, @Param("user") User user);
|
Page<Event> findUserFuture(Pageable offsetablePageRequest, @Param("user") User user);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user