DDC-2863: multiple oneToMany entity relations not working, unless specified under one sigle oneToMany entry #3619

Closed
doctrinebot opened this Issue Dec 18, 2013 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user domnuprofesor:

this does not work:

oneToOne:
  user:
    targetEntity: Project\Entity\User
    mappedBy: settings
oneToOne:
  language:
    targetEntity: Project\Entity\Language
    joinColumn:
      name: language_id
      referencedColumnName: id

and this works:

oneToOne:
  user:
    targetEntity: Project\Entity\User
    mappedBy: settings
  language:
    targetEntity: Project\Entity\Language
    joinColumn:
      name: language_id
      referencedColumnName: id

while the latter is nicer, I don't see why the first one should not work.
Also, this situation should have been prevented in the documentation.

@doctrinebot

Comment created by @beberlei:

This is nothing we can prevent or document better. This is just the YAML format and it works like PHP arrays, duplicate key specification removes the previously set data.

@doctrinebot

Issue was closed with resolution "Invalid"

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