1

I have an NHibernate entity that has 2 relationships of many to many.

Suppose I have a detached version of this entity, will SaveOrUpdate be able to decide Saving or Updating thru the related objects as well?

Eran Betzalel
  • 4,105
  • 3
  • 38
  • 66

1 Answers1

1

It depends on how relationship is configured.

The main things that come to mind are cascading and whether it is inverse or not.

If you want things to automatically cascade (~work thru) then just set that in you hbm collection association node

cascade="all"

There are more cascading options worth reading and understanding

Community
  • 1
  • 1
dove
  • 20,469
  • 14
  • 82
  • 108