I use hibernate2 (net.sf.hibernate.dialect.DB2390Dialect) with COM.ibm.db2.jdbc.app.DB2Driver
and have very easy case:
one table (parent) have composite-id with 3 columns: 18-langht String, integer and short
second (child) Table have composite-id with 4 columns (tree from parent and addition short )
I define relationship only in parent mapping (child can’t live without parent)
<set name = "children">
<key>
<column name="string"/>
<column name="integer"/>
<column name="short"/>
</key>
<one-to-many class="de.kkh.business.entity_hb.person.child"/>
</set>
I load my parent and see in log, that hibernate find in DB2 my child for this parent, but my result Set "children “ is on the end empty!!!
If I chance definition the tables from long-long 18-langht String to short (for example), I have my Set OK.
The question is: if hibernate has same problem with composite-keys as String?
I can’t chance my model :(.
|