mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
CE-1546 - fixing the use long for id in test
This commit is contained in:
@ -372,9 +372,16 @@ public class MemoryRecordStore
|
||||
// set the next serial in the record if needed //
|
||||
/////////////////////////////////////////////////
|
||||
if(recordToInsert.getValue(primaryKeyField.getName()) == null && (primaryKeyField.getType().equals(QFieldType.INTEGER) || primaryKeyField.getType().equals(QFieldType.LONG)))
|
||||
{
|
||||
if(primaryKeyField.getType().equals(QFieldType.LONG))
|
||||
{
|
||||
recordToInsert.setValue(primaryKeyField.getName(), (nextSerial++).longValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
recordToInsert.setValue(primaryKeyField.getName(), nextSerial++);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// make sure that if the user supplied a serial, greater than the one we had, that we skip ahead //
|
||||
@ -383,7 +390,7 @@ public class MemoryRecordStore
|
||||
{
|
||||
nextSerial = recordToInsert.getValueInteger(primaryKeyField.getName()) + 1;
|
||||
}
|
||||
else if(primaryKeyField.getType().equals(QFieldType.LONG) && recordToInsert.getValueLong(primaryKeyField.getName()) > nextSerial)
|
||||
else if(primaryKeyField.getType().equals(QFieldType.LONG) && recordToInsert.getValueInteger(primaryKeyField.getName()) > nextSerial)
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// todo - mmm, could overflow here? //
|
||||
|
Reference in New Issue
Block a user