Fixed problems with resetSequence() not using the correct sequence name

in postgres
This commit is contained in:
Jose Lorenzo Rodriguez 2012-10-21 16:32:52 +02:00
parent d4631a6ead
commit c00d58b4ef

View file

@ -287,7 +287,10 @@ class Postgres extends DboSource {
if (is_object($table)) {
$table = $this->fullTableName($table, false, false);
}
if (isset($this->_sequenceMap[$table]) && isset($this->_sequenceMap[$table][$field])) {
if (!isset($this->_sequenceMap[$table])) {
$this->describe($table);
}
if (isset($this->_sequenceMap[$table][$field])) {
return $this->_sequenceMap[$table][$field];
} else {
return "{$table}_{$field}_seq";