Skip to content

The default objectManagerLoader doesn't work when the entity has an embedded field. #254

Closed
@VincentLanglet

Description

@VincentLanglet

Since #253, the metadata is resolved without the need of an objectManagerLoader.

It works well, but I have the following issue:

$this->getEntityManager()->getRepository(Expedition::class)->getListOrders($context, $date);

report an error

Call to an undefined method Doctrine\ORM\EntityRepository<App\Entity\Expedition>::getListOrders().  

getRepository is considered as an EntityRepository instead of ExpeditionRepository.
Seems like that as soon as I remove the field

/**
 * @ORM\Embedded(class="App\Entity\Embeddable\Slot")
 */
private ?Slot $slot = null;

from the Expedition entity, it works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions