Hi,
In the recently added documentation about Embeddable objects
(http://docs.doctrine-project.org/en/latest/tutorials/embeddables.html), it
is stated the following : "Embeddables can only contain properties with
basic @Column mapping."
If I'm not mistaken that means that you cannot use entities inside an
embedded object ?!
That means that, to take the same use case as the docs, it would be
impossible to use a collection of Cities (or Countries) within the embedded
object !
/** @Entity */class User{
/** @Embedded(class = "Address") */
private $address;}
/** @Embeddable */class Address{
/** @Column(type = "string") */
private $street;
/** @Column(type = "string") */
private $postalCode;
/** @Column(type = "string") */ >> Replace here with a ManyToOne on City
private $city;
/** @Column(type = "string") */ >> Replace here with a ManyToOne on Country
private $country;}
So basically, unless you have no duplicated data (or you don't care about
them), embeddable objects will be useless in such a case ...
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.