티스토리 뷰

@Query(value = "select * from conference c where c.book_id = :id AND c.call_end_time < CURRENT_TIMESTAMP", nativeQuery = true)
Page<Conference> findFinishedConferencesByBookId(@Param("id") Integer id, Pageable pageable);

@Query(value = "select * from conference c where c.book_id = :id AND c.call_start_time > CURRENT_TIMESTAMP", nativeQuery = true)
Page<Conference> findExpectingConferencesByBookId(@Param("id") Integer id, Pageable pageable);

https://www.baeldung.com/spring-data-jpa-query

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods

댓글