javax.persistence.Query.getResultList(). The query result can be paginated by not retrieving all the rows at once. Fields are mapped to values in the result following these rules: SELECT m FROM Movie m or SELECT NEW MovieDescription(m.title, m.genre) FROM Movie m), then the fields are mapped to bean property names.SELECT m.title, m.gender FROM Movie m), the fields are mapped using the following syntax: COLUMN_index[.property], with the indexes starting from 1. Example mappings: COLUMN_1, COLUMN_2, COLUMN_2.title, COLUMN_2.movie.title. | |