NHibernate Master Detail Deletion?

You actually need a many-to-many relationship in this case.

You actually need a many-to-many relationship in this case: object_sequence And the same on the other side: (*note the inverse="true") object_sequence From the N0 Documentation: Very Important Note: If the column of a association is declared NOT NULL, Nbernate may cause constraint violations when it creates or updates the association. To prevent this problem, you must use a bidirectional association with the many valued end (the set or bag) marked as inverse="true". See the discussion of bidirectional associations later in this chapter.

Finally, I'm unsure if you really want to use a bag here. One user can have the same favorite two or more times? P.S.: Also, note that lazy="true" is the default behavior since N2.

Setting inverse="true" would make it so that he would have to delete the details manually after deleting the master. I don't know if that is what he's going for here. – Min Dec 23 '08 at 14:47 For me, this solves the problem.It deletes the childes when deleting the parent.

– Tobias Jun 28 at 7:40.

Thanks, but I still get the same error. – Craig Dec 23 '08 at 13:23 Sorry, try this. Forgot the not-null tag.

– Elie Dec 23 '08 at 14:27 I get an error about not-null not being a valid attribute. – Craig Dec 24 '08 at 0:43.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions