posted 12 years ago
Is it possible to define lazy fetch for specific named queries in an entity POJO. I mean i have a Person table with a one-to-many mapping defined on to other tables. Eg: For my UI which lists only the names of all the Person rows, I just need the name of all the person entries and feel that I need not fetch the entire column contents of the table along with the data of whatever mapped children tables it has. I mean all my named queries that I have defined in my JPA Pojo should return me the entire object with child values as well, except this specific query alone.
Thanks in advance