-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mutable is ignored on relations
PostPosted: Mon Sep 12, 2005 6:46 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
I have a class that has maps a one-to-many relationship through a bag.

The class on the other end of the relation is set to 'mutable=false'.

When I add a class to the iList (the bag), a session.flush will actually create an insert statement for the mutable=false class. This is not at all how I would expect nhibernate to react. (inverse property has no impact)

1. Could someone define the working of mutable ?

(There is another one to many relationship on the mutable=false class that does need to get persisted).

2. If I set Cascading to none on the relationship, it does not try to insert the class. And it will insert the second relationship. However, during insert it will complain about having an unsaved transient object.
So the question is: why is a mutable = false still treated as a transient object, while it actually is not (it's only an easy object to bind relationships to)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 9:21 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
- bump -

I'm still running into this issue.

When I have a relation to a mutable=false class, it will complain about it being untransient. If I attach the unmutable class, it will try to create an insert..


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 01, 2006 2:57 pm 
Newbie

Joined: Fri Dec 09, 2005 2:22 pm
Posts: 16
mutable=false prevents the class from being updated or deleted, not inserted.


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