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