Beginner |
|
Joined: Wed Aug 03, 2005 8:06 am Posts: 40 Location: Netherlands
|
ISession.Save(object) generates a new Id by getting the next value of the Oracle sequence. So you will have to prepare new objects and Save() them, without flushing the session yet (so you can do a rollback if necessary).
BTW I have bad experiences with meaningful primary keys. If this key has any meaning (which it probably does if you want to show it), I would prefer using an alternate key for it and have your data access get a nextvalue of another sequence. You won't have to Save() your objects then.
|
|