[DC-362] Doctrine fails to create correct table structure if model is named "User" Created: 16/Dec/09 Updated: 08/Jan/10
|Component/s:||Behaviors, Query, Relations|
|Reporter:||Michael Henriksen||Assignee:||Jonathan H. Wage|
Mac OS X 10.6.2 (10C540) (Snow Leopard) with MAMP 1.8 bundle:
When building models and database structure from YAML schema, Doctrine ignores the behaviors and relations on models if it is named "User":
This creates the following table structure:
The table structure is both missing foreign key constraints to Company, Timezone and Role. It is also missing columns updated_at and created_at for Timestampable behavior. The slug column for Sluggable behavior is missing, as well.
When looking at the BaseUser::setUp() method it looks as it is supposed to:
So the only area where it goes wrong, is when generating the queries for creating the model tables. I don't know if the same problem appears with other model names, but it doesn't like models named "User".
If I rename the model to "Person" and rebuild, it all works perfectly as it should.
|Comment by Michael Henriksen [ 16/Dec/09 ]|
Forgot to mention, that it works perfectly when renaming model to something else than "User"
|Comment by Sander [ 08/Jan/10 ]|
Have the same problem in 1.2.1 at PostgreSQL 8.4