Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0.5
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Oracle 9.2.0.1
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi,
I'm just curious. I've searched in the documentation, and as far as i've known there is no part that states that in the <set for one-to-many, must have
ordered foreign key columns for join and cascading delete to work. Am i missing it ?
This works :
Quote:
<set
name="mstSlstrgBranches"
lazy="true"
inverse="true"
cascade="all">
<key>
<column name="PRODUCT_CODE" />
<column name="BUREAU_CODE" />
<column name="SLSMAN_TYPE_CODE" />
</key>
<one-to-many
class="distr.mst.model.MstSlstrgBranch"
/>
</set>
This doesnt work(there is no exception in the joins, but the cascading delete resulted in oracle's constraint violation exception) :
Quote:
<set
name="mstSlstrgBranches"
lazy="true"
inverse="true"
cascade="all">
<key>
<column name="SLSMAN_TYPE_CODE" />
<column name="BUREAU_CODE" />
<column name="PRODUCT_CODE" />
</key>
<one-to-many
class="distr.mst.model.MstSlstrgBranch"
/>
</set>
Thanks in advance,
Albert Kam
[/b]