DDC-546 - Rename ClassMetadataInfo::FETCH_EXTRALAZY to ClassMetadataInfo::FETCH_EXTRA_LAZY
This commit is contained in:
parent
a3cab174ca
commit
247fc43cef
@ -126,7 +126,7 @@ class ClassMetadataInfo
|
|||||||
* commands such as Collection#count, Collection#slice are issued directly against
|
* commands such as Collection#count, Collection#slice are issued directly against
|
||||||
* the database if the collection is not yet initialized.
|
* the database if the collection is not yet initialized.
|
||||||
*/
|
*/
|
||||||
const FETCH_EXTRALAZY = 4;
|
const FETCH_EXTRA_LAZY = 4;
|
||||||
/**
|
/**
|
||||||
* Identifies a one-to-one association.
|
* Identifies a one-to-one association.
|
||||||
*/
|
*/
|
||||||
|
@ -404,7 +404,7 @@ final class PersistentCollection implements Collection
|
|||||||
*/
|
*/
|
||||||
public function contains($element)
|
public function contains($element)
|
||||||
{
|
{
|
||||||
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRALAZY) {
|
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
|
||||||
return $this->coll->contains($element) ||
|
return $this->coll->contains($element) ||
|
||||||
$this->em->getUnitOfWork()
|
$this->em->getUnitOfWork()
|
||||||
->getCollectionPersister($this->association)
|
->getCollectionPersister($this->association)
|
||||||
@ -465,7 +465,7 @@ final class PersistentCollection implements Collection
|
|||||||
*/
|
*/
|
||||||
public function count()
|
public function count()
|
||||||
{
|
{
|
||||||
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRALAZY) {
|
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
|
||||||
return $this->em->getUnitOfWork()
|
return $this->em->getUnitOfWork()
|
||||||
->getCollectionPersister($this->association)
|
->getCollectionPersister($this->association)
|
||||||
->count($this) + $this->coll->count();
|
->count($this) + $this->coll->count();
|
||||||
@ -671,7 +671,7 @@ final class PersistentCollection implements Collection
|
|||||||
*/
|
*/
|
||||||
public function slice($offset, $length = null)
|
public function slice($offset, $length = null)
|
||||||
{
|
{
|
||||||
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRALAZY) {
|
if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
|
||||||
return $this->em->getUnitOfWork()
|
return $this->em->getUnitOfWork()
|
||||||
->getCollectionPersister($this->association)
|
->getCollectionPersister($this->association)
|
||||||
->slice($this, $offset, $length);
|
->slice($this, $offset, $length);
|
||||||
|
@ -23,11 +23,11 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
$class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
||||||
$class->associationMappings['groups']['fetch'] = ClassMetadataInfo::FETCH_EXTRALAZY;
|
$class->associationMappings['groups']['fetch'] = ClassMetadataInfo::FETCH_EXTRA_LAZY;
|
||||||
$class->associationMappings['articles']['fetch'] = ClassMetadataInfo::FETCH_EXTRALAZY;
|
$class->associationMappings['articles']['fetch'] = ClassMetadataInfo::FETCH_EXTRA_LAZY;
|
||||||
|
|
||||||
$class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsGroup');
|
$class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsGroup');
|
||||||
$class->associationMappings['users']['fetch'] = ClassMetadataInfo::FETCH_EXTRALAZY;
|
$class->associationMappings['users']['fetch'] = ClassMetadataInfo::FETCH_EXTRA_LAZY;
|
||||||
|
|
||||||
|
|
||||||
$this->loadFixture();
|
$this->loadFixture();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user