Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Path<Date> accountCreatedTime = root.<Date> get("AccountCreatedTime");
- Path<Date> firstPostCreatedTime = root.<Date> get("FirstPostCreatedTime");
- final Predicate timeInHourPredicate = criteriaBuilder
- .greaterThanOrEqualTo(accountCreatedTime, FirstPostCreatedTime);
- select u
- from users u
- join posts p on p.user_id = u.id
- where datediff('hour', u.account_created_time, p.first_post_created_time)
Add Comment
Please, Sign In to add comment