This SO question explains the save-update option for the cascade attribute in NHibernate as follows:
save-update – when the object is saved/updated, check the associations and save/update any object that requires it (including save/update the associations in many-to-many scenario).
Does it mean that NHibernate keeps track of objects that were modified and need to be updated in the database when an associated object triggers a database operation or that NHibernate simply updates everybody regardless of modifications being made to them?
I’m trying to find out what is the exact meaning of the “requires” word in that sentence.
Thanks!
NHibernate always keeps track of modified objects; this is not related to cascade.
requires in this context means basically that transient objects that are referenced will be saved when the referencing object is saved/updated.