@Repository public interface PostRepository extends JpaRepository {
Page<Post> findAllByCategory(Pageable pageable, Category category);
LocalDate dateBefore4Hours = LocalDate.now().minus(4, ChronoUnit.HOURS); //tried but couldnt figured it out
@Query("SELECT a FROM Post a WHERE a.createdDate ") //none of sql keywords i've tried here didnt wor
Page<Post> findAllWithCreationDateTimeInLastFourHours();
}