Answer the question
In order to leave comments, you need to log in
Why doesn't embedded class work in Doctrine 2 and Symfony 2/3?
I'm trying to add an embedded class for an entity according to the documentation , but it doesn't work. Symphony cannot detect Embedded and Embeddable annotations.
<?php
/** @Entity */
class User
{
/** @Embedded(class = "Address") */
private $address;
}
/** @Embeddable */
class Address
{
/** @Column(type = "string") */
private $country;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question