1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/lib/Doctrine/ORM/Id/IdentityGenerator.php

27 lines
472 B
PHP
Raw Normal View History

<?php
namespace Doctrine\ORM\Id;
class IdentityGenerator extends AbstractIdGenerator
{
2008-09-07 17:48:40 +04:00
/**
* Enter description here...
*
2008-09-12 14:40:23 +04:00
* @param Doctrine_ORM_Entity $entity
2008-09-07 17:48:40 +04:00
* @return unknown
* @override
*/
public function generate($entity)
2008-09-07 17:48:40 +04:00
{
return $this->_em->getConnection()->lastInsertId();
}
/**
* @return boolean
* @override
*/
public function isPostInsertGenerator()
{
return true;
}
}