A newbe question, but I didn't found the response in the forum nor the docs.
Supose following:
Code:
Table "Person"
+Id
+Name
+IdAddress (allow null)
Table "Meeting"
+Id
+Date
+IdAddress (allow null)
Table "Address"
+Id
+Street
So the table "Address" is referenced by other two (Address.Id -> Person.IdAddress, Address.Id -> Meeting.IdAddress).
I would like to do something like that:
Code:
Person p1 = ... 'retrieve from database
p1.IdAdress = null
mysession.flush()
This should delete the date in table "Address". I try to use "all-delete-orphan" in the association xml file but it doesn't work. NHibernate don't do it?