Hi all,
Is there any way to filter entity's mapped collection? I have AnObject having a collection of AChildObject. I'd like to make a query (preferably criteria-based, but HQL is acceptable) returning list of AnObject with prefetched AChildObject collections, but not all of children - a subset of them. So I can use AnObject.getChildren() without issuing additional queries to the DB and get subset of childrens...
I hope I managed to be clear enough ;-) Any help (or suggestion of alternative approach for effective obtaining a list of items with filtered related objects) will be greatly appreciated.
Wojtek
|