Thank you for the suggestion, but using ITransaction.Flush
isn't appropriate in our scenario:
- we would not want to send changes to the database at this point (we'd end up with db transactions being open for too long);
- there's no natural place in our design to put such a call (the code that's using the id field doesn't look at the scope, never mind the transaction and I really don't want that code interacting with the transaction).
I'd still like an answer to my original question(s): when is the id field set / what can I do ensure it has happened (without sending changes to the database).
Best regards, Peter