Well, if your goal is to dynamically change if a collection is loaded lazily or not, well, I don't know any way of doing it. You can just create a couple of methods. Mark the association as lazy, and then have an eagerFetch method that just calls the getter for the list, which will force a loading of the association, essentially making it eagar when used.
_________________ Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?" http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials
|