aspose file tools
The moose likes Object Relational Mapping and the fly likes Hibernate: changing value of discriminator field Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate: changing value of discriminator field" Watch "Hibernate: changing value of discriminator field" New topic
Author

Hibernate: changing value of discriminator field

Oleg SanbIch
Greenhorn

Joined: Sep 27, 2004
Posts: 1
Hello,

How do I change the value of discriminator field in Hibernate?
I have a hierarchy of classes:
UserVO <---- NewUser <---- IncompleteUser <------ ActiveUser

Where <---- means "extends", UserVO is an abstract class at the top of hierarchy. All these classes are mapped to the same 'user' table with discriminator field 'USER_TYPE'. Now if I have a record with 'NewUser' value in discriminator field and want to change it to 'IncompleteUser' (user status changes), how do I do that with Hibernate?

Thanks,
-Oleg.
 
 
subject: Hibernate: changing value of discriminator field
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com