Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: one->many List without initializing collection on write?
PostPosted: Mon Jun 04, 2012 11:53 pm 
Beginner
Beginner

Joined: Wed Jan 21, 2009 8:41 pm
Posts: 45
So I've got a one to many list association that I'm inserting to. I observe that even when using List semantics with IndexColumn it still needs to fully initialize my collection even though it's LAZY whenever I add an element to this collection.

I'm looking to add to a collection where I don't need to fully initialize it's existing contents. Is that possible? In my case I'm not using Set to I have no uniqueness expectations so why does it need to initialize the to-many part of this association whenever I want to add an element to it?

I have large collections. I don't want to use an extra lazy collection for what I'm doing.

I need to be able to optimize writes such that for very large collections it doesn't need to initialize the collection before it will let me do my insert of this element in the collection.


Top
 Profile  
 
 Post subject: Re: one->many List without initializing collection on write?
PostPosted: Tue Jun 05, 2012 9:11 pm 
Beginner
Beginner

Joined: Wed Jan 21, 2009 8:41 pm
Posts: 45
As far as I can tell the only way to not initialize a collection when you add to it is to make it an extra lazy association.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.