Home

 

Adding named queries

Named queries can provide additional functionality, such as retrieving all the instances of a class, or retrieving related instances by following a relationship and sorting the results. When following the relationships through the generated collection (Set), the related instances can be in any order.

Note that named queries are based on the entity attributes, and not on the column names in the mapped table.

ibm.com/redbooks