Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:[/b]
[b]Mapping documents:[/b]
[b]Code between sessionFactory.openSession() and session.close():[/b]
[b]Full stack trace of any exception that occurs:[/b]
[b]Name and version of the database you are using:[/b]
[b]The generated SQL (show_sql=true):[/b]
[b]Debug level Hibernate log excerpt:[/b]
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html
I have been really strugging with some thing for the last couple of days
This is what I want to achieve
Person has a bank account has one contact
Contact has many phones many addresses etc
so when I set bankaccount to null I want the contact tree to disappear
this isn't happening I don;t know how to do thi
I first modelled bank account as a composite element then made it an entity as well.. but does not seem to cut it
<class name="BankAccount" table="BankAccount" lazy="true">
<id name="id" type="integer" column="id">
<generator class="native"/>
</id>
<property name="accountName">
<column name="Account_Name"/>
</property>
<property name="branch">
<column name="Branch"/>
</property>
<property name="accountNumber">
<column name="Account_Number"/>
</property>
<property name="bsb">
<column name="BSB"/>
</property>
<property name="bankName">
<column name="BankName"/>
</property>
<many-to-one name="bankContact" column="Contact_Id" unique="true" class="com.tramada.contact.model.Contact" cascade="all"/>
and I have in person a bag of bankaccounts
now when i set the bankaccount to be null i.e I delete the bank account reasonable expectation contact should disappear as well but only bank account disappears and not contact
Really struggling with this and I feel like breaking my head against a wall
I don't seem to see teh same thing in the test cases of hiberante
Can anyone help....
Can anyone help me..........