1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/lib/Doctrine/ORM/Id/IdentityGenerator.php

28 lines
470 B
PHP

<?php
namespace Doctrine\ORM\Id;
class IdentityGenerator extends AbstractIdGenerator
{
/**
* Enter description here...
*
* @param Doctrine_ORM_Entity $entity
* @return unknown
* @override
*/
public function generate($entity)
{
return $this->_em->getConnection()->lastInsertId();
}
/**
* @return boolean
* @override
*/
public function isPostInsertGenerator() {
return true;
}
}