Defer Transaction Commits During Save

There are situations, where you need to write some data rows to the database in order to get their autonumbered Ids and use this Ids during the same transaction. In these situations you can use the flag deferCommit:

... // Make some objects persistent
pm.Save(true);  // Save the first bunch of objects
... // Use the objects by other objects which depend on the first bunch of objects
pm.Save();  // Commit the transaction