-->
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: Overriding super class column names in TABLE_PER_CLASS
PostPosted: Tue Dec 12, 2006 4:20 pm 
Newbie

Joined: Fri Feb 24, 2006 8:26 pm
Posts: 5
I'm trying to map a legacy table design into hibernate and I'm running into a problem where I have two tables that are logically sub classes of an abstract superclass. I tried using MappedSuperclass but I've found that I have other tables refering by id(its unique across both tables) back to that abstract superclass, and you can't have an association pointing to a MappedSuperclass.

I'm now trying to use table per class inheritance but @AttributeOverride doesn't work there and there are fields in the tables that have different column names but have the same logical meaning. I'd like to have it mapped in the parent class and only the column names set in the sub classes.

Is there a way to do essentially the same thing as @AttributeOverride when doing table per class mapping, or some way to have an association to a MappedSuperclass?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 5:12 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
no unfortunately this is not possible. You can try mapping a view that fix the column name though

_________________
Emmanuel


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.