mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
@@indentity changed to something a bit more stable
This commit is contained in:
parent
bb4acb78c8
commit
1d06cfc10e
@ -180,7 +180,8 @@ class MSSQLDatabase extends Database {
|
||||
}
|
||||
|
||||
public function getGeneratedID($table) {
|
||||
return $this->query("SELECT @@IDENTITY FROM \"$table\"")->value();
|
||||
//return $this->query("SELECT @@IDENTITY FROM \"$table\"")->value();
|
||||
return $this->query("SELECT IDENT_CURRENT('$table')")->value();
|
||||
}
|
||||
|
||||
function getPrimaryKey($tableName){
|
||||
@ -1012,6 +1013,7 @@ class MSSQLDatabase extends Database {
|
||||
|
||||
return $searchResults;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user