Hello I've three tables.
table one
table two
table depend
depend has the columns one_id, two_id and some others. one_id and two_id is the Primary Key
one and depend have a 1:n relation.
two and depend have a 1:n relation too.
How can i constitute that a entry in depend depends on one and two.
In my Java-files i don't want to have a one-object and a two-object. I only want for the row one object. It must be sure, that one, two and depend are not independet.
I hope my problem is understandable.
How to map the depend.hbm.xml file? And the other two files?
Hibernate version:
newest
Mapping documents:
current wrong mapping for depend:
<many-to-one
name="tasOne"
class="tas.beans.hibernate.One"
not-null="true"
cascade="none"
>
<column name="one_id" />
</many-to-one>
<many-to-one
name="tasTwo"
class="tas.beans.hibernate.Two"
not-null="true"
cascade="none"
>
<column name="two_id" />
</many-to-one>
This is wrong, because there ist no relation between one and two
Full stack trace of any exception that occurs:
Name and version of the database you are using:
mysql 4.1
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
|