Thanks for your answer.I tried with mappings by defining a query for collection loading.
Hibernate tries to execute the query when we access children lazily but the problem is how to pass parameters through mappings file.I do not want to call named query and pass params explicitly.
Any idea on how to do it?
Thanks
derek wrote:
using annotations and mapping the hibernate associations to the getter/setters rather than directly to a property, i have accomplished something similar by populating the pseudo-relation set when the setter for the related property is called.
alternately, if your DB supports views, you might consider creating a view with the query that you use to populate your pseudo-relation set and mapping the relationship to the view in hibernate.