I have 2 classes and they're mapped as 1-to-1
class B mapping:
<one-to-one class="ClassA" constrained="true" name="a" property-ref="bId"/>
class A mapping:
<property insert="false" name="bId" type="integer" update="false">
<column length="200" name="BID" not-null="false"/>
</property>
<many-to-one class="ClassB" name="b">
<column name="BID" not-null="false"/>
</many-to-one>
when i call:
A a = (A) session.load(A.class, 1);
session.delete(a.getB());
B record gets deleted, but BID in A stays intact. Why!? Any help is appreciated.
many-to-one) not 1-to-1 (one-to-one) for class A.Repeated column in mapping for entity