jquery auth
jquery auth

Reputation: 1277

How do you tell NHibernate to ignore persisting a child object

How do you tell NHibernate to ignore persisting a child object? I have my my mapping set up so a Person has an address so when I attempt to persist Person without an address or with a new address then gives a flushing error. Now I know I can Cascade, but is it possible to tell NHibnerate not to worry about the address?

Upvotes: 0

Views: 202

Answers (1)

Diego Mijelshon
Diego Mijelshon

Reputation: 52725

You can:

  • Not map the address at all
  • Cascade the address
  • Save the address manually

You can't selectively ignore some objects.

Upvotes: 1

Related Questions