-->
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.  [ 2 posts ] 
Author Message
 Post subject: Heritage: transform an object from a type to another type
PostPosted: Fri Sep 11, 2009 1:02 am 
Newbie

Joined: Wed Sep 09, 2009 1:17 am
Posts: 4
Hi,

I use some heritage in my model objects:

Code:
@Entity @Table @Inheritance(strategy = InheritanceType.JOINED)
public class User extends AbstractModel {
    // User
}

@Entity @Table
public class AuthorizedUser extends User {
    // Authorized user
}

I will have to transform my objects from a type into another type, without deleting them, in order to keep dependencies between objects:

  • a user into an authorized user
  • an authorized user into a user

I did not find any way to do this. Is it possible ?

Thanks


Top
 Profile  
 
 Post subject: Re: Heritage: transform an object from a type to another type
PostPosted: Thu Oct 01, 2009 12:21 am 
Newbie

Joined: Wed Sep 09, 2009 1:17 am
Posts: 4
I am afraid that this simple SQL request cannot be done with Hibernate, and I really don't know how to do that. :(


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