Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:3.0
[b]Mapping documents:
PARENT
<!-- bi-directional one-to-many association to AgreementProperty -->
<set name="AgreementProperties" lazy="false" inverse="false" cascade="all-delete-orphan">
<key>
<column name="AGRMT_ID" />
</key>
<one-to-many class="com.mutualofomaha.iaa.bean.agreement.AgreementProperty" />
</set>
CHILD
<!-- bi-directional many-to-one association to Agreement -->
<many-to-one name="Agreement" foreign-key="AGRMT_ID" class="com.mutualofomaha.iaa.bean.agreement.Agreement" not-null="true" insert="true" update="true">
<column name="AGRMT_ID" />
</many-to-one>
Hello Everyone, this maybe a newb question but I am frustrated.
I am trying to simply delete a child. My mappings are above.
Basically we open a session, grab the object, overlay values, remove possible objects(like removing a child) then do a saveOrUpdate and then loop through all deletes then session.flush(); Every combination I have tried I get errors with.
Should I be doing the deletes and then flush and then saveorUpdate then flush()?
So I have tried to remove from parent set and delete through session. NullPointer within some transientEntity class.
Next I removed the delete on session of the child and just removed from parent set. Same thing.
I have been searching on internet for any information and just keep getting more frustrated. My example there is no intermediate join table. I simply want hibernate to delete the child row.