-->
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: Stale object or Dirty collection errors.
PostPosted: Mon Apr 26, 2004 11:23 am 
Newbie

Joined: Fri Apr 23, 2004 3:14 pm
Posts: 1
Location: Minnesota
I've got a problem with the following objects(Really ugly table structure, but we're stuck with it for now):

Class UserWorkgroupSetup{
WorkgroupSetup workgroup;
Set workgroupSellerSetups;
}
Class WorkgroupSetup{
Set sellerPartnerships;
}
Class WorkgroupSellerSetup{
UserWorkgroupSetup userWorkgroup;
SellerPartnershipSetup sellerPartner;
}
Class SellerPartnership{
WorkgroupSetup workgroup;
}
The problem appears to me to be in the mapping between the UserWorkgroupSetup and the WorkgroupSellerSetup which is a follows:

UserWorkgroupSetup:
<set name="workgroupSellers" cascade="all" lazy="false" inverse="true">
<key column="USER_WORKGROUP_ID"/>
<one-to-many class="com.notiva.cbo.buyer.data.setup.types.WorkgroupSellerSetup"/>
</set>

WorkgroupSellerSetup:
<many-to-one column="USER_WORKGROUP_ID" name="userWorkgroup" not-null="true" class="com.notiva.cbo.buyer.data.setup.types.UserWorkgroupSetup"/>

If I don't use session.lock(userWorkgroupSetup, LockMode.NONE), I get a stale object exception. If I do, I get a "reassociated object has dirty collection" exception.

Any help would be greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 4:58 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
code.

_________________
Emmanuel


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.