Auto increment type is incrementing but not assigning values

If you think that something doesn't work in Aware IM post your message here
Post Reply
gerber1
Posts: 52
Joined: Wed Jun 15, 2011 2:48 pm
Location: Weston, FL, USA

Auto increment type is incrementing but not assigning values

Post by gerber1 »

I am using 5.1 Build 1425

I have an object with a Number attribute where I have checked "Auto incremented." It has been working and now has stopped. This is in the test DB, where I reuse the data each time I test.

What I see is that the value in the ..._idg table is being incremented each time I add an object instance, but the attribute that is set for "Auto incremented" ends up with NULL.

The Aware IM Server log only shows that it is checking to see if any user has changed the value, prepared to reset it if this condition is true, but in each case this is not true, and it executes no action. I'll look at the mySQL Log tomorrow if nobody else reports some experience with this.

I deleted all objects having a NULL for the attribute (OrderNumber), but that did not help either. I saw this once before and was at a point where I could delete all instances and begin again, and it started working again, but I am to a point where that is a problem.

Has anyone else seen this? Are there more things to inspect to troubleshoot the problem?

Some of these objects get deleted, so it will not always be true that the ..._idg table value matches the highest value of the attribute in the object table.

Thanks,
Roy
aware_support
Posts: 7559
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

If the value in the _idg table is being correctly incremented, most likely the problem is somewhere in your rules - you must be setting UNDEFINED value to this attribute yourself. Check the rules log.
Aware IM Support Team
gerber1
Posts: 52
Joined: Wed Jun 15, 2011 2:48 pm
Location: Weston, FL, USA

Post by gerber1 »

You are correct, but the rule is the "Auto calculation of OrderCustomer.OrderNumber" which is created by Aware IM that is causing the problem. Here's what happened:

Originally, I was going to calculate the OrderNumber, but before I ever wrote a rule for it, I changed it to "Auto incremented." Nevertheless, the "Calculated" checkbox was already checked. Once you check "Auto incremented," the "Calculated" checkbox is disabled. This makes it look like it should be left enabled, which is the cause of the problem. The combination of these two turned on causes the failure.

The way to fix this is to momentarily turn off the "Auto incremented" checkbox, which allows you to uncheck "Calculated," and then you can recheck "Auto incremented." Then the system performs as intended.

I suggest the following "fix:" If "Auto incremented" is being checked on, turn off the "Calculated" value before disabling its checkbox.

Thanks,
Roy
aware_support
Posts: 7559
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

This has been fixed in build 1445
Aware IM Support Team
Sergej
Posts: 218
Joined: Tue Aug 30, 2011 2:24 pm
Location: Russian Federation

Post by Sergej »

Hi!
I found another possible bug with autoincremented number.

Can be reproduced in Ordering app.
Create new blanc bussines space Ordering.
Add to Product OrderNumber attribute Autoincr. checked From range - 10
Login , you will see all products are already have autoincr. numbers
Go to Conf.Tool again
Autoincremented stays checked in OrderNumber attribute now enter From range - 1000
Login and create Product BO
It will not increment from 1000 now.
AwareIM 5.1a build 1454, Debian 64bit , MySQL
Post Reply