-->
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: Inheritance problem with Annotations in primary key !!!!
PostPosted: Tue Oct 04, 2005 12:14 am 
Regular
Regular

Joined: Tue Nov 04, 2003 12:37 pm
Posts: 57
Hello,

How can I define the Annotation for Inheritance ?

@Entity(access = AccessType.FIELD)
@Inheritance(strategy=InheritanceType.JOINED)
@Table(name="BASE_OBJECT")
class Base implements Serializable {
@Id
long id;
}




@Entity
class User extends Base {

// how can I also include this for the primary key
// if I add @Id here, it raised exception !!!
// how can I do this ?
String username;

}
[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 2:24 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
http://forums.hibernate.org/viewtopic.php?t=941555&sid=b8075c9be62776ff3c9dec8d5797ab7a


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.