This content has been marked as final.
Show 2 replies
-
1. Re: Effective collection practices with session-scoped object
kapitanpetko May 27, 2009 10:47 AM (in response to vk101)If you are using Hibernate, it has an API (Hibernate.initialize) that lets you load a specified collection (preserving already loaded ones).
Or you could use SMPC (Seam Managed Persistence Context) and forget about merge. That however, might be
inefficient (depending on your app design).HTH
-
2. Re: Effective collection practices with session-scoped object
cpopetz May 27, 2009 2:48 PM (in response to vk101)This is really a JPA question, and AFAIK there is no way under the JPA spec to do what you're trying to do.
My suggestion is that if the collections in question are really large enough that loading them lazily and/or eagerly fetching them presents a speed or memory footprint issue, then they should be refactored to be more manageable, or you should use queries to only pull in the data you actually need.