User BO ID incremented by hundreds not 1 for newuser

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

User BO ID incremented by hundreds not 1 for newuser

Post by swiftinitpvtltd »

I thought ID is getting incremented by 1 for each BO new item but I have noticed for User BO ID getting incremented by hundreds not 1 for newuser. So if last ID was 3234 then when new user registers his ID is becoming 4665 something like that. Why the internal ID is increment not by 1 but by hundreds sometimes thousands....? same thing for other BO's.
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: User BO ID incremented by hundreds not 1 for newuser

Post by swiftinitpvtltd »

After looking at all BO's closely I found out that the ID's are getting incremented based on last transaction id for any BO in the entire system. Suppose there are 100k transactions in other BOs and then you add new User his ID becomes 1000001 even if you have just 800 users.... So ideally the new userid should be 801...
Do we have to create another autoID column if we want ID to be incremented by 1?
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: User BO ID incremented by hundreds not 1 for newuser

Post by customaware »

The ID is an internal Aware ID that comes from IDGEN.
It is used for All new objects.

So... If you create a new Employee with ID 10001
and then create , say 100 Product Records
and then create another Employee, then the 2nd Employee ID will be 10102

If you want consecutive IDs for Employees then you should maintain your own MyID Attribute
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: User BO ID incremented by hundreds not 1 for newuser

Post by swiftinitpvtltd »

Thanks Mark! I will use another auto-incremented AutoID for other things.
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: User BO ID incremented by hundreds not 1 for newuser

Post by swiftinitpvtltd »

Now one important question is if we have multiple stored procedures and they do Insert into then how do we handle that?
We used autoincremental settings to "ON" in mysql to make that insert into work.
Post Reply