-->
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: [Solved][Question] One class represents multiple tables
PostPosted: Tue Jan 30, 2007 7:44 pm 
Newbie

Joined: Wed Oct 12, 2005 9:20 pm
Posts: 16
Location: Sydney
Hibernate version: 3.0

Hi,

I need to redevelop an application using an existing database schema. I am using Tibco Business Events for the Object representation so I can't customise the getters or setters or anything in these objects...

Rate has a RateInstance.
RawRate extends from Rate.
NormalizedRate extends from Rate.

In the database, RawRate got its own table, NormalizedRate got its own instance.

The problem is for RateInstance... In the database, there is one table for each type of RateInstance: RawRateInstance and NormalizedRateInstance.

Is it possible to represent that using Hibernate mapping?

I didn't find any posts in this forum.

The reason why I need to separate these tables (even if it's a bad design) is because the client will use both the application and the database to read/change the data.

Hope I'm clear enough.

Cheers


Last edited by ben.amiot on Wed Jan 31, 2007 1:08 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 31, 2007 1:07 am 
Newbie

Joined: Wed Oct 12, 2005 9:20 pm
Posts: 16
Location: Sydney
After talking to the manager, they agreed that we needed to create 2 new objects: RawRateInstance and NormalizedRateInstance which extends RateInstance.

In the hibernate mapping the fix was easy to do.


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.