DAO for named query which performs select returning a subset of columns

17 views
Skip to first unread message

Enrico Giurin

unread,
Feb 19, 2010, 6:18:33 AM2/19/10
to Parancoe-dev
Hello,
as parancoe user/developer I would like to have a facility on a way to
fire named-query which returns only a subset of all the columns of my
entity/entities.

@NamedQuery(name = "Book.selectTitleAndAuthor",
query = "select book.title, book.author from Book book where
book.language = ?")

In my mind I have the idea of a new DAO wich contains several methods
which return a specific complex object containing all the info
connected with the records found.

Something like

ComplexObject selectTitleAndAuthor(String language);

Reply all
Reply to author
Forward
0 new messages