symfony/symfony — Issue #2461: Define an entity in YAML and it accepts only one (first) relation mapping
Author: mkontula
Created: 2011-10-24 15:51:47+00:00
State: open

I'm a newbie with Symfony, so this issue might be in the wrong repo a dublicate or by all means off-topic, but here's what I encountered today:

**Current behaviour:** (2.0.4) running on WAMP server 2.2 (php 5.3.8, mysql 5.5.16 and apache 2.2.21)

1. Define Entities: Reservation, Category and Service.
2. Reservation has some fields and manyToOne relations to Category and Service.
3. Generate database schema from console
4. Generate entities from console
5. Reservation table and php class shows only one (first) defined relation (in this case, category_id as it was the first one)

**Expected behaviour:**
5. Reservation table should have both category and service id's.

Being unable to fix this behaviour with YAML-juggling, I ported the entities to use php annotation and voilá - the database and entity generation produced expected results.