1
0
mirror of synced 2025-01-31 04:21:44 +03:00

minor bug fix

This commit is contained in:
zYne 2007-01-09 22:58:49 +00:00
parent 2e7b683b59
commit d14e19a6fb

View File

@ -46,7 +46,7 @@ class Doctrine_Sequence_Pgsql extends Doctrine_Sequence
$query = "SELECT NEXTVAL('" . $sequenceName . "')";
try {
$result = (int) $this->fetchOne($query);
$result = (int) $this->conn->fetchOne($query);
} catch(Doctrine_Connection_Exception $e) {
if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) {
@ -72,7 +72,7 @@ class Doctrine_Sequence_Pgsql extends Doctrine_Sequence
$seq = $table.(empty($field) ? '' : '_'.$field);
$sequenceName = $this->conn->quoteIdentifier($this->conn->getSequenceName($seqName), true);
return (int) $this->fetchOne("SELECT CURRVAL('" . $sequenceName . "')", 'integer');
return (int) $this->conn->fetchOne("SELECT CURRVAL('" . $sequenceName . "')");
}
/**
* Returns the current id of a sequence