2008-09-07 17:48:40 +04:00
|
|
|
<?php
|
|
|
|
|
2008-09-12 14:02:06 +04:00
|
|
|
class Doctrine_ORM_Id_SequenceIdentityGenerator extends Doctrine_ORM_Id_IdentityGenerator
|
2008-09-07 17:48:40 +04:00
|
|
|
{
|
|
|
|
private $_sequenceName;
|
|
|
|
|
|
|
|
public function __construct($sequenceName)
|
|
|
|
{
|
|
|
|
$this->_sequenceName = $sequenceName;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enter description here...
|
|
|
|
*
|
|
|
|
* @param Doctrine_Connection $conn
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function getPostInsertId()
|
|
|
|
{
|
|
|
|
return $this->_em->getConnection()->lastInsertId($this->_sequenceName);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|