There are two Parent/Children relationship entities. And only have the mapping configuration in child's hbm.xml file. Like this:
<many-to-one
name="child"
class="com.Child"
update="true"
insert="true"
cascade="save-update">
<column not-null="false" name="PARENT_ID"></column>
</many-to-one>
No <one-to-many>
configuration in parent's hbm.xml.
Now I want to use ClassMetaData to get all the properties from the entity to verify it dirty or not. But I cannot get the child
properties from ClassMetaData because it not configured.
But When I use session.saveAndUpdate(parentEntity), Hibernate knows the child is dirty and can update dirty child entity. How the Hibernate do that? Is there anyway that I can get the dirty state of the child entity?