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?
|