Skip to content

Commit

Permalink
Fix a test where PostgreSQL seems to use other IDs than other DBMSes
Browse files Browse the repository at this point in the history
Just use the ID directly here, since the aim of the test is to test eager loading (not the IDs being assigned or the sort order)
  • Loading branch information
mpdude committed Feb 27, 2023
1 parent 1042cce commit c653f98
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ public function testFind(): void

public function testEagerLoadsAssociation(): void
{
$this->createFixture();
$customerId = $this->createFixture();

$query = $this->_em->createQuery('select c, m from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c left join c.mentor m where c.id = :id');
$query->setParameter('id', $customerId);

$query = $this->_em->createQuery('select c, m from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c left join c.mentor m order by c.id asc');
$result = $query->getResult();
$customer = $result[1];
$customer = $result[0];
$this->assertLoadingOfAssociation($customer);
}

Expand Down

0 comments on commit c653f98

Please sign in to comment.