Allow deferred save of entities with autogen ids

Fixes issue #225