symfony/symfony — Issue #3376: Relations between entities from different bundles do not work when using yml
Author: TheHippo
Created: 2012-02-16 11:01:18+00:00
State: open

Here an very basic example:

```yaml
Acme\FirstBundle\Entity\Entity1:
type: entity
table: Entity1
id:
id:
type: integer
generator:
strategy: AUTO
fields:
field1:
type: string
length: '4'
oneToMany:
entities2:
targetEntity: Acme\SecondBundle\Entity\Entity2
mappedBy: entity1
```

```yaml
Acme\SecondBundle\Entity\Entity2:
type: entity
table: Entity2
id:
id:
type: integer
generator:
strategy: AUTO
fields:
field2:
type: string
length: '4'
manyToOne:
entity1:
targetEntity: Acme\FirstBundle\Entity\Entity1
inversedBy: entities2
```

When both entities are in the same bundle everything works fine (even, when you use a full path as `targetEntity`)

P.S.: When using annotation everthings works fine.