-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to optimize mapping file if using inheritance
PostPosted: Tue Feb 05, 2008 5:20 pm 
Newbie

Joined: Thu Jan 10, 2008 11:23 am
Posts: 4
Location: NJ, USA
It's table-per-concrete type situation.

I have multiple tables, which has these couple of columns, which are same in each table.
Example lastUpdateDate, lastUpdateUser etc.

Now I got super class having these columns. And all other POJOs extend this class.

But in my mapping files, I have mapping of these columns in each class mapping file.

Is it possible to define these common column mappings single place and let other mappings refer it?

_________________
Thanks
Ashish Jain
http://www.jframeworks.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 06, 2008 3:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Use DTD entities to avoid repetition

or

Use annotations where there actually is a superclass you can put that definition on.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: example of DTDs?
PostPosted: Wed Feb 06, 2008 6:49 am 
Newbie

Joined: Thu Jan 10, 2008 11:23 am
Posts: 4
Location: NJ, USA
We are using jdk 1.4, so annotations approach is out.

Any article or documentation link, about DTD approach?

_________________
Thanks
Ashish Jain
http://www.jframeworks.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 06, 2008 7:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
any dtd/xml tutorial should cover that. nothing hibernate specific.

I don't have anything on hand.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.