-->
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.  [ 1 post ] 
Author Message
 Post subject: Id column name in Table per concrete class strategy
PostPosted: Wed Sep 17, 2008 12:09 pm 
Newbie

Joined: Wed Sep 17, 2008 11:56 am
Posts: 1
Hibernate version: latest

Hello,
Is it possible to override a primary key column name in table per concrete class strategy?

For example:
Having db like:
create table TABLE_A (
table_a_id integer primary key,
description text
)


create table TABLE_B (
table_b_id integer primary key,
description text
)

And in mapping like this:
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Table {

private String description;
...

}

@Entity

public class Table_A extends Table{


}

@Entity
public class Table_B extends Table {


}

Where and how to put primary key mapping?

Regards,
Piotr Foremniak


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.