Originally posted by Choon-Chern Lim:
If user A inserts a new record without flushing it, and user B queries the record in split second, wouldn't user B acquire that record with null ID assigned to it?
How would user B manage to query for a record that doesn't yet exist?
However, in one of my unique scenarios, I noticed the newly inserted row doesn't have an ID value assigned to it yet (assigned as "native" since my primary key uses DB identity) after I queried all rows.
You have an entity defined that allows a null primary key? How did your RDBMS allow you to get away with that? I ask since this violates one of the rules of that defines a PK, namely that it is unique, unchanging and
not null.
[ August 09, 2006: Message edited by: Paul Sturrock ]