Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: 1.2.4
-
Component/s: Schema Files
-
Labels:None
-
Environment:symfony 1.4.5, postgresql 8.4, debian lenny, nginx
Description
Firstly I created database directly in postgresql.
After that I generated schema from existsing database and after all i built model.
When I try to insert new record to database I received following error:
sequence "Category_id_seq" does not exist
In schema file sequence name is defined like this: sequence: '"Address_id_seq"'
There's are apostrophes and quotes.
In Category model file is same like above, apostrophes and quotes.
When I remove quotes from sequence in model files everything is ok and there're no problems with insert new row to database.
Problem are quotes in sequence name.
Sequence names in schema built from existing database have quotes in their names, e.g ' "Address_seq" ' and Doctrine try to execute sequence with quotes but in database names exist without quotes.
Temporarly I fixed it by add str_replace() into importer from PostgreSQL - now in schema sequence names are without quotes.