Spring Data JPA: Query result directly into DTO
One of the hidden gems of Spring Data JPA is the possibility to put your query results directly into a DTO instead of having it transformed by a mapper
One of the hidden gems of Spring Data JPA is the possibility to put your query results directly into a DTO instead of having it transformed by a mapper
How to create a JPA base entity without mapping it onto a separate table
Use Restrictions.sqlRestriction(“1=1 order by rand()”) as a simple workaround for random ordering in Criteria.