Please note: this project is inactive since early 2006

4.6 Saving Changes

When you are ready to save changes you made in an EditingContext, you simply send it the message saveChanges():


which then performs all appropriate actions needed to make your changes persistent into the database.

Before it saves changes, the EditingContext checks every object against constraints derived from the underlying model, as well as your own validation logic if you have defined some; of course, deleted objects are examined as well and checked against possible specific relationships' constraints (such as: an object, which has a relationship whose deleteRule is DENY, should have no more objects registered to that relationship) -see 3.3 for details.

Then and again before saving changes, it propagates the deletions, if needed (cf. relationship's deleteRule(): CASCADE and NULLIFY). For precisions on this, and/or if you want to trigger this propagation at specific moments (e.g., when a HTTP request/response loop finishes), see documentation for EditingContext.processRecentChanges().

Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted Logo