hi, every one,
first of all, thanks those gays who make Hibernate tools, which let code generation into a rush job.
here is my question:
i create 3 tables in MySql(sample DB of middlengen), "persons", "airlines", "reservations",
one-many between "persons" and "reservation", one-many between "airlines" and "reservation".
i get perfect result when i create the project in Eclipse3 for the first time, three objects and two links, but after i regenerate the hbm.xmls and POJOs, i lost the links.
part of the map file look like this:
<hibernate-mapping>
<class name="Reservations" table="reservations" catalog="airline">
<comment></comment>
<composite-id name="id" class="ReservationsId">
<key-property name="reservationId" type="int">
<column name="reservation_id" />
</key-property>
<key-property name="personIdFk" type="int">
<column name="person_id_fk" />
</key-property>
<key-property name="flightIdFk" type="int">
<column name="flight_id_fk" />
</key-property>
</composite-id>
<property name="registrationUtc" type="timestamp">
<column name="registration_utc" length="0" not-null="true">
<comment></comment>
</column>
</property>
<property name="comment" type="string">
<column name="comment" length="65535">
<comment></comment>
</column>
</property>
</class>
</hibernate-mapping>
why? is there an option there?
|