-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: session.lock throws exception when encountering new collecti
PostPosted: Fri Dec 22, 2006 6:26 am 
Newbie

Joined: Fri Dec 22, 2006 6:13 am
Posts: 2
I have a hibernate entity which is kept in the http session. Upon retrieval from the session I try to lock the entity if the id is set (it is persistent). Unfortunately this provokes problems when collection properties are brand new - not of type PersistentCollection. I don't understand this. I use lock in order to reattach an entity which may have lazy properties to the current session. Basically editing a persistent entity in a conversation.

Do I always have to use an existent persistent collection - which is always provided with persistent instances ? Usually we set a new collection and have had no issues yet.


Top
 Profile  
 
 Post subject: Re: session.lock throws exception when encountering new coll
PostPosted: Fri Dec 22, 2006 7:33 am 
Newbie

Joined: Fri Dec 22, 2006 6:13 am
Posts: 2
It seems that even editing the persistent collection does not help. When reattaching the entity with the new session an exception is thrown because the collection is dirty.

I want to flush at the end of the conversation only.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.