-->
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: Tables with same structure, but different column names
PostPosted: Thu May 12, 2005 1:47 pm 
Newbie

Joined: Thu May 12, 2005 1:31 pm
Posts: 4
Hello,

I know that I can map multiple tables to one class using 'entity-name', but the problem is that column names aren't always the same, for example:

TABLE1:
ID(SMALLINT) NAME(VARCHAR 100) VALUE(VARCHAR 100)


TABLE2
ID(SMALLINT) CUSTOMER_NAME(VARCHAR 100) VALUE(VARCHAR 100)

Is it possible to map this tables to one class with 'entity-name'? Any other options?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 1:50 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
For each entity name you must still specify hbm mapping.
So it is no problem for you to map same class with different entity name and different column names.


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