replaced statement in generateSQLID with MAX() expression
This commit is contained in:
parent
e756709eff
commit
06fd698c41
1 changed files with 1 additions and 1 deletions
|
@ -487,7 +487,7 @@ public final class NodeManager {
|
||||||
String retval = null;
|
String retval = null;
|
||||||
try {
|
try {
|
||||||
Connection con = map.getConnection ();
|
Connection con = map.getConnection ();
|
||||||
String q = "SELECT "+map.getIDField()+" FROM "+map.getTableName()+" ORDER BY "+map.getIDField()+" DESC LIMIT 1";
|
String q = "SELECT MAX("+map.getIDField()+") FROM "+map.getTableName();
|
||||||
qds = new QueryDataSet (con, q);
|
qds = new QueryDataSet (con, q);
|
||||||
qds.fetchRecords ();
|
qds.fetchRecords ();
|
||||||
long currMax = qds.getRecord (0).getValue (1).asLong ();
|
long currMax = qds.getRecord (0).getValue (1).asLong ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue