posu wrote:
Hello,
I need a join, for instance, book shelf joined with new books.
There is a table of book shelfes and a table of books, book has a property named "new".
How do I implements shelf.getNewBooks() ?
Of course, I know that i can write a query to get new books, but the method getNewBooks() would require a session as a method artument and i don't like that..
Is there any smart way?
Thank you.
you can specify a named query in your bookshelf class definition.
then the hibernate proxy will do everything for you. you won't need to pass a session.