DDC-2826: Add support for mapping collections of embeddable objects #3579

doctrinebot opened this Issue Nov 28, 2013 · 1 comment

2 participants


Jira issue originally created by user songoko20000:

In Hibernate we can do something like this:

    public class User {
       public String getLastname() { ...}

       @CollectionTable(name="Addresses", joinColumns=@JoinColumn(name="user_id"))
          @AttributeOverride(name="street1", column=@Column(name="fld_street"))
       public Set<Address> getAddresses() { ... } 

    public class Address {
       public String getStreet1() {...}

Basically a collection of value objects is mapped to a new table. Currently Doctrine2 is on its way to support value objects

However, this implementation won't support mapping a collection of objects to a new table and the only way to circumvent this issue is to treat the address an an entity and use an one-to-many unidirectional relationship through a many-to-many join table


Comment created by @doctrinebot:

A related Github Pull-Request [GH-835] was closed:

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment