-->
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: Hibernate Mapping Question
PostPosted: Tue Jan 11, 2011 11:23 am 
Beginner
Beginner

Joined: Mon Sep 20, 2010 2:35 am
Posts: 20
Hi All,
i am trying to map some classes using some hibernate and arrived at a case where i am unable to find the best way to achieve the solution.
i have three classes namely AirTransport,TrainTransport and RoadTransport and they have certain properties which are getting mapped correctly.
we have to store TRANSPORTTIME entries of these classes but don't want to store time entries of individual classes in there respective tables,
we want to create a TRANSPORTTIME table where we can store time related entries of the above defined three classes.

since these three classes are independent so i am confused how best to map these classes's time entry in to the TRANSPORTTIME table.
i tried to do something like this in the three transport classes
Code:
<set name="timeTable" table="TRANSPORTTIME" inverse="true" lazy="true">
            <key>
                <column name="UUID" />
            </key>
            <one-to-many class="TransportTime" />
        </set>


but not sure how to map the things on the other side i.e TRANSPORT table
any help or pointer in this regard will be helpfull


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.