Unique ids disentangled
I think I've finally got the unique id system working the way I want it to. Now every record in a record list has a unique id (from PHP); embedded records get the unique id of their parent as a prefix, and then add their own id to it; and "new" embedded records are assigned a unique id from a JavaScript function I wrote, so that if they're "saved" (meaning stashed, pending a Save of the parent record, they can have unique form elements.
Now I need to figure out how to do that stashing. We only need to stash copies of all existing unchanged records; all changed records; and all new records added. We don't need to save record ids (primary keys) because all relational entries for the parent record will be purged when it's saved, and then new entries created for everything submitted. This will need some thought.