Cascade in TList fields

The SaveUpdate cascades cannot work with entities that don’t have automatic generators. The generators are “none”.

This prevents Aurelius from doing proper automatic save/update cascades.

The reason is simple: when you call Save(Doc), it does it correctly, then it will automatically try to save the details.

For each detail, it needs to decide if it’s an INSERT or UPDATE in the database. It does that exactly by checking if the detail object has an id or not. If there is no id, Aurelius generate a new one and performs an INSERT. Otherwise, an UPDATE.

But since you have already set the ID property, Aurelius thinks it needs to do UPDATE, and thus no INSERT is made.

There are two workarounds here:

The only workaround is save master and then manually save each detail.