diff --git a/tests/Tests/ORM/Functional/Ticket/SwitchContextWithFilter/CompanySQLFilter.php b/tests/Tests/ORM/Functional/Ticket/SwitchContextWithFilter/CompanySQLFilter.php index e65188334ac..d1e38528bf1 100644 --- a/tests/Tests/ORM/Functional/Ticket/SwitchContextWithFilter/CompanySQLFilter.php +++ b/tests/Tests/ORM/Functional/Ticket/SwitchContextWithFilter/CompanySQLFilter.php @@ -14,11 +14,11 @@ class CompanySQLFilter extends SQLFilter public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias): string { if ($targetEntity->getName() === User::class) { - return sprintf('%s.%s = %s', $targetTableAlias, $targetEntity->fieldMappings['company']['fieldName'], $this->getParameter('company')); + return sprintf('%s.%s = %s', $targetTableAlias, $targetEntity->fieldMappings['company']->fieldName, $this->getParameter('company')); } if ($targetEntity->getName() === Order::class) { - return sprintf('%s.%s = %s', $targetTableAlias, $targetEntity->fieldMappings['company']['fieldName'], $this->getParameter('company')); + return sprintf('%s.%s = %s', $targetTableAlias, $targetEntity->fieldMappings['company']->fieldName, $this->getParameter('company')); } return ''; diff --git a/tests/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Tests/ORM/Mapping/ClassMetadataTest.php index f187371dfd0..4c57891c2d8 100644 --- a/tests/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Tests/ORM/Mapping/ClassMetadataTest.php @@ -886,7 +886,7 @@ public function testAssociationOverrideCanOverrideCascade(): void $cm->setAssociationOverride('parentDirectory', ['cascade' => ['all']]); $mapping = $cm->getAssociationMapping('parentDirectory'); - self::assertSame(['remove', 'persist', 'refresh', 'detach'], $mapping['cascade']); + self::assertSame(['remove', 'persist', 'refresh', 'detach'], $mapping->cascade); } #[TestGroup('DDC-1955')]