[Teneo] single join table for mtm results in exception [message #604709] |
Thu, 12 April 2007 20:03 |
Mark Geib Messages: 432 Registered: July 2009 |
Senior Member |
|
|
Martin,
I updated my model so all many-to-many relationships include the
annotation for setting indexed=false. The resulting database tables look
great. I loaded my data and saved into the database with no problem.
However, when I try to access objects via these single join tables I get
Hibernate exceptions that state the indexed column is NULL, etc.
The mapping file for one of these looks like...
<bag name="contacts" lazy="true"
cascade="merge,persist,save-update,lock,refresh" table="`service_contact`">
<key update="true">
<column name="`service_e_id`" not-null="true" unique="false"/>
</key>
<many-to-many entity-name="Contact" unique="false">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</many-to-many>
</bag>
and ....
<bag name="services" lazy="true"
cascade="merge,persist,save-update,lock,refresh" inverse="true"
table="`service_contact`">
<key update="true">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</key>
<many-to-many entity-name="Service" unique="false">
<column name="`service_e_id`" not-null="true" unique="false"/>
</many-to-many>
</bag>
Any ideas...?
Thanks,
Mark.
|
|
|
Powered by
FUDForum. Page generated in 0.02773 seconds