Skip to content

Commit

Permalink
Use the right property
Browse files Browse the repository at this point in the history
association mappings do not have a fetchMode property, they have a fetch
property.
  • Loading branch information
greg0ire committed Jan 21, 2023
1 parent 3239ca0 commit 32446ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public function testEagerLoad(): void
public function testLazyLoadsObjectsOnTheOwningSide(): void
{
$this->createFixture();
$metadata = $this->_em->getClassMetadata(ECommerceCart::class);
$metadata->associationMappings['customer']['fetchMode'] = ClassMetadata::FETCH_LAZY;
$metadata = $this->_em->getClassMetadata(ECommerceCart::class);
$metadata->associationMappings['customer']['fetch'] = ClassMetadata::FETCH_LAZY;

$query = $this->_em->createQuery('select c from Doctrine\Tests\Models\ECommerce\ECommerceCart c');
$result = $query->getResult();
Expand Down

0 comments on commit 32446ed

Please sign in to comment.