Hi For the attachment group document you want to remove set the attachment group property to null before using flush or transaction commit. For more info check the documentation concerning bidirectional associations.
Regards On 24 mrt, 04:59, Kolli Ayyappa <[email protected]> wrote: > Hi, > > I have main table having relation to child table , so that i created hbm > files as below specified > > Top level parent table.hbm > > <many-to-one name="AttachmentGroup" class="AttachmentGroup" column=" > `AttachmentGroupId`" not-null="false" fetch="select" cascade="all" /> > > SUb class table (attachmentgroup.hbm) > > <bag name="AttachmentGroupDocuments" inverse="true" cascade=" > all-delete-orphan" lazy="false"> > > <key column="`AttachmentGroupId`" /> > > <one-to-many class="AttachmentGroupDocument" /> > > </bag> > > AttacmentGroupdocument.bm file > > <many-to-one name="AttachmentGroup" class="AttachmentGroup" column=" > `AttachmentGroupId`" not-null="true" fetch="select" cascade="all" /> > > I am using session.saveorUpdate(obj) > > Now when delete row to attachmentgroupdocuments during commit, i am getting > below error messgae > > *deleted object would be re-saved by cascade (remove deleted object from > associations)[Aon.ATD.Domain.Model.AttachmentGroup#2* > > Please help on this issue fix > > Thanks, > > Ayyappa -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
