-->
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.  [ 1 post ] 
Author Message
 Post subject: Updating the discriminator value
PostPosted: Mon Dec 10, 2007 5:27 am 
Newbie

Joined: Tue Nov 20, 2007 4:57 am
Posts: 7
Hey, I have something similar to the following:

abstract class source;
public class source_A extends source;
public class source_B extends source;

With their <subclass> mapping which is fairly simple, the two classes use the same fields and discriminator values SOURCE_A and SOURCE_B

What I want to do is update an object from being a source_A object to being a source_B object. What I do is create a new source_B object, set all it's properties, set the id as the id that source_A originally had and call update(). This updates all fields in the database correctly and on the correct line, except for the discriminator, which is still SOURCE_A.

Does anyone know what I should be doing?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.