-->
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 JOINED with ID Column in Subclass
PostPosted: Wed Dec 03, 2014 9:18 am 
Newbie

Joined: Wed Dec 03, 2014 9:14 am
Posts: 1
Hi there,

is there any chance to have AutoIncrement PK Columns in Subtypes? e.g.

Code:
@Inheritance(strategy = InheritanceType.JOINED)
@Entity
public class A{
@Id @Auto...
private Integer id;
}


@Entity
public class B extends A{
@Id @Auto...
private Integer id;
}


Thanks a lot
Chris


Top
 Profile  
 
 Post subject: Re: Inheritance JOINED with ID Column in Subclass
PostPosted: Wed Dec 10, 2014 9:45 am 
Newbie

Joined: Tue Dec 09, 2014 1:13 am
Posts: 2
Matdo,

You don't get to specify the ID in the subtypes, it copies the values of the parent.
If the subtypes incremented their values independently, how would you join them with the parent?


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.