-->
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.  [ 5 posts ] 
Author Message
 Post subject: Session.merge() immutable class
PostPosted: Fri Nov 24, 2006 8:18 am 
Beginner
Beginner

Joined: Sat Oct 04, 2003 7:00 am
Posts: 26
Location: Roma,IT
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.2

Name and version of the database you are using:
Mysql 5.0

Hi,
I've some classes marked as immutable, one of each is parth of implicit polimorphism hierarchy. thi class is "AssociatedAddressBookEntry" that is subclass of "AddressBookEntry".

so if id do:


Code:
Long id = ...
Sesions s = ...
Transaction tx = s.beginTransaction();
AddressBookEntry abe = (AddressBookEntry)s.get(AssociatedAddressBookEntry.class,id);
abe.setName("Pincopallino");
s.merge(abe);
tx.commit();


this, of course, not update the "abe" entiy, but don't issue an Exception. It's correct behavior?[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 6:43 am 
Newbie

Joined: Tue Sep 19, 2006 4:13 am
Posts: 18
True - this is expected .

No updates for mutable="false" :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 9:24 am 
Beginner
Beginner

Joined: Sat Oct 04, 2003 7:00 am
Posts: 26
Location: Roma,IT
ok, yes no update, but also no exception


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 1:37 pm 
Newbie

Joined: Tue Sep 19, 2006 4:13 am
Posts: 18
No exception either!

Simply after identifing the obect immutable hibernate doesnot fire flush for that.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 10:56 am 
Beginner
Beginner

Joined: Sat Oct 04, 2003 7:00 am
Posts: 26
Location: Roma,IT
ok i'm glad for your time


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