Hi,

I have a special problem with an one to many association:

Given following (generated) structure:


Hocaras\Bundle\Core\DatabaseBundle\Entity\Language:
  type: entity
  fields:
    languageId:
      id: true
      type: integer
      generator:
        strategy: AUTO
    languageCode:
      type: string
      unique: true
      length: 2
      nullable: true


Hocaras\Bundle\Core\DatabaseBundle\Entity\Translation:
  type: entity
  fields:
    translationKey:
      id: true
      type: string
      length: 127
    languageId:
      id: true
      type: integer
      associationKey: true
  manyToOne:
    language:
      targetEntity: Hocaras\Bundle\Core\DatabaseBundle\Entity\Language
      joinColumns:
        languageId:
          referencedColumnName: languageId
          nullable: false


Hocaras\Bundle\Core\DatabaseBundle\Entity\City:
  type: entity
  fields:
    cityId:
      id: true
      type: integer
      generator:
        strategy: AUTO
  manyToOne:
    translations:
      targetEntity: Hocaras\Bundle\Core\DatabaseBundle\Entity\Translation
      joinColumns:
        translationKey:
          referencedColumnName: translationKey



The problem is the manyToOne association from City->Translation as it is 
wrong... it should be an oneToMany association as a city (name) has 
multiple translations....
If i create a oneToMany connection, it has to be a bidirectional. The 
second problem is, if you use this bidirectional association and generate 
via doctrine:schema:create
a foreign key will be created references the city... That will work for one 
Table, but it is impossible if i add new Tables (like State or Country) 
with translationKey.

Is there any way to fix this problem?


Thanks for help








-- 
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.

Reply via email to