Hibernate version: 2.1.5
Name and version of the database you are using: Oracle 9i
I am adapting a legacy system where I have a flight record represented by two tables as such:
Code:
table a
--------
record serial number (pk)
date_scheduled
city 1
table b
--------
record serial number (fk)
record sequence number
city 2
weight
record serial number & record sequence number are the pk of this table
As an example you can have
Code:
Serial Seq City1 City2 Weight
ABC1 1 MCI ANC 500
ABC1 2 MCI CHI 300
I am unsure on what the best method for mapping this is....should I have one POJO to represent the record and have hibernate represent it across two tables or should I have two POJO's with a MANY-TO-ONE relationship? Are there other options that might be better?
Thanks for your time,
Ryan