-->
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: preventing hibernate from creating cols from inherited props
PostPosted: Tue Jul 24, 2007 2:49 am 
Newbie

Joined: Wed May 30, 2007 1:30 am
Posts: 2
i have the following classes:

Code:
@MappedSuperClass
class Animal {
     string name;
     int color;
     int legs;
}


class Dog extends Animal {
    // i want hibernate to create columns for all the inherited properties from
    // animal class
}

class Bird extends Animal {
    // i want the bird table to have columns for only the name
    // and color
}

class InvisiblePet extends Animal {
    // i want the invisible pet table to have columns for only the name
    // property
}



as you can see, i want to somehow be able to hide or disable some properties in my subclasses which was inherited from the super class so that their respective table doesnt create columns for all the properties they inherited. i'm not sure if this is possible because i've been googling for about 2-3 hours now and i still cannot find a straight answer.


reyjexter


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.