markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 302 forks source link

how the ID get generated? #313

Closed john-qin closed 10 years ago

john-qin commented 10 years ago

I am not sure if this is an issue. I am using simple.data on one of my application. I checked the records in my tables. I see the ID from 1, 2,3 ,4,5, jump to 10002, 10003 ... 10041, jump again to 20018 ... 20028.

I noticed that those records that get inserted in the same day, their ID only increment by 1. if not the same day, will increment by 10000.

btw, i am using sql server 2008 r2. ID is the primary key

markrendle commented 10 years ago

That won't be anything Simple.Data is doing. It sounds like there might be replication set up with IDENTITY ranges assigning new ranges each day, or something. But Simple.Data doesn't try to generate IDs at all, so the problem is elsewhere.