DiscriminatorMap: getRepository of child class works only with all models in the main model folder #5602

Closed
opened 2026-01-22 15:12:28 +01:00 by admin · 1 comment
Owner

Originally created by @jasperem on GitHub (Jul 7, 2017).

Originally assigned to: @Ocramius on GitHub.

$entityManager()->getRepository(Child::class)->findAll()

works only with all classes in the main model folder.

works:

Model/Parent.php
Model/ChildA.php
Model/ChildB.php

not works:

Model/Parent.php
Model/Parent/ChildA.php
Model/Parent/ChildB.php

not works:

Model/Parent/Parent.php
Model/Parent/ChildA.php
Model/Parent/ChildB.php

Originally created by @jasperem on GitHub (Jul 7, 2017). Originally assigned to: @Ocramius on GitHub. ### $entityManager()->getRepository(Child::class)->findAll() ### works only with all classes in the main model folder. ## works: ## Model/Parent.php Model/ChildA.php Model/ChildB.php ## not works: ## Model/Parent.php Model/Parent/ChildA.php Model/Parent/ChildB.php ## not works: ## Model/Parent/Parent.php Model/Parent/ChildA.php Model/Parent/ChildB.php
admin added the BugIncompleteMissing Tests labels 2026-01-22 15:12:28 +01:00
admin closed this issue 2026-01-22 15:12:29 +01:00
Author
Owner

@Ocramius commented on GitHub (Jul 7, 2017):

Closing as incomplete: "works" or "doesn't work" require a test case ;-)

@Ocramius commented on GitHub (Jul 7, 2017): Closing as `incomplete`: "works" or "doesn't work" require a test case ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5602