Hello all,
I developed an application with Hibernate and MySQL and now I have to migrate it to DB2, the problem is that the DB2 Server owner doesn't ALLOW foreign keys in their new tables...I can only create primary key constraints not foreign keys constraints.
So using the same mapping files (mapping sets with bi-dir many-to-many relationships, etc...) Hibernate does NOT retrieve the collections, it generates the correc SQL query but the property accessor for the collection always return an empty set...
Here's some code...
<hibernate-mapping>
<class name="htmlgenerator.pojos.Presentacion" table="TTLSBPTR" schema="TLSB">
<id name="idPresentacion" type="java.lang.String">
<column name="COD_MPAPRES" length="34" />
<generator class="uuid" />
</id>
<property name="descripcion" type="java.lang.String">
....
....
<set name="tqueries" table="TTLSBPQM" schema="TLSB">
<key column="COD_MPAPRES" not-null="false" />
<many-to-many class="htmlgenerator.pojos.Consulta" column="COD_MPAQUERY" />
</set>
....
So my question is, how I can write/generate mapping files without using foreign keys, how I can mapping the relations between objects/tablets????
|