4
Views
5
Comments
ID Returned From CreateOrUpdate
Question
Is the following senario in any way possible in the OS Platform:

1) User_A inserts a table row using CreateOrUpdate_Entity with null Id (Autonumber Identity) in Source.
2) User_B next immediately inserts into same table using CreateOrUpdate_Entity Action with null Id
    (Autonumber Identity) in Source.
3) After some other processing, User_A assigns the  CreateOrUpdate_Entity.Id from step 1) to a var,
   but rather than getting the Id for the row inserted in step 1), gets the Id for the row inserted by 
   User_B in step 2)

I don't believe this should happen in any case, but we are experiencing a bug where this is effectively what has happened.  I'm going to setup a test to see if I can make this happen, but I would like to know if anything like this has happened to anyone else.  Thanks.

2014-02-13 10-06-38
Ricardo Silva
Are you using SQL Server or Oracle as a database backend ?
UserImage.jpg
Bob
SQL Server
2016-04-22 00-29-45
Nuno Reis
 
MVP
Right now I made a test with 5 concurrent processes creating 10000 records each on table A and id reused into table B. Not a single one was out of place (SQL Server, version 7).
2019-11-12 17-31-26
Justin James
 
MVP
If you look at the DB tables, SQL Server is creating those numbers based on a sequence. Unless you have a very serious error with your SQL Server, that should be impossible.

J.Ja
UserImage.jpg
Bob
Thanks Guys.  I'll look elsewhere for the cause of the bug.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.