gdoron
gdoron

Reputation: 150253

what does inverse and cascade means in NHibernate

I'm learning Fluent Nhibernate and my question is:
What does Inverse mean? I read that it means that the other side of the relationship is responsible for the saving, and so does Cascade,

Can someone please explain what are the differences between them? Please explain in details because I'm a newbie at NH.

Upvotes: 9

Views: 6447

Answers (2)

kay.herzam
kay.herzam

Reputation: 3063

Have a look at this text (link down, here's a mirror on archive.org), the "inverse" attribute is explained in detail.

The different cascade options are well explained by Ayende himself in his blog.

A good and recommended read is "NHibernate in Action", while not an easy text, this will cover a lot of your questions.

Upvotes: 1

gdoron
gdoron

Reputation: 150253

I found an explanation when Inverse = false is necessary. If I want a Parent with collection of "children" and in the child object there won't be a reference to the parent.
so you do Has many on the parent add inverse = false and not adding the reference in the child.

Upvotes: 0

Related Questions