-->
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: [EJB3]Adding a component to the ID of a class in inheritance
PostPosted: Sat Jun 17, 2006 10:01 am 
Newbie

Joined: Sat Jun 17, 2006 9:47 am
Posts: 1
Hibernate version:
Hibernate 3 under EJB3

All I want is to know if this is possible using the EJB3 over hibernate 3 and Jboss 4.0.4 GA.

I have a parent class

abstract class A{

Integer id;
attr A;
attr B;
}

class B extends A{

string aName;
attr C;
attr D;
}


I want to make aName in class B a part of the primary Key so the primary key in b will be (id -> pk,fk, aName,pk) I must enforce that no aName is repeated and I must index this field (so the field can't be nullable)

I ruled out the Single Table strategy. As I'm using POSTGRE SQL and it supports SQL UNION I really don't care if the strategy is JOINED or TABLE_PER_CLASS).

Please tell me if there is a way I can do this.


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.