Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.3
-
Fix Version/s: None
-
Component/s: Extensions, Import/Export
-
Labels:None
-
Environment:symfony 1.4.5 with latest doctrine 1.2 branch with sfDoctrineGuardPlugin
Description
The import works only when i DISABLE the update relation. When i activate the update relation i get an sql error
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`clubicious`.`location`, CONSTRAINT `location_updated_by_sf_guard_user_id` FOREIGN KEY (`updated_by`) REFERENCES `sf_guard_user` (`id`))
The relation is created correct i think the problem is in the importer???
Location:
actAs:
Timestampable: ~
Sortable: ~
Blameable:
columns:
created:
length: null
updated:
length: null
relations:
created:
disabled: false
class: sfGuardUser
updated:
disabled: false
class: sfGuardUser
columns:
name:
My fixtures:
sfGuardUser:
gfranke:
id: 1
first_name: Gordon
last_name: Franke
email_address: franke@clubicious.com
username: gfranke
password: startgf
Location:
location_atomic:
name: Atomic Cafe
CreatedBy: gfranke
UpdatedBy: gfranke
location_max:
name: Max & Moritz
CreatedBy: gfranke
UpdatedBy: gfranke
Same Problem with Doctrine 1.2.2 and Zend Framework 1.10
Work around for me was to disable all Blameable relations in my schema.yml
Then run
./doctrine build-all-reload
So that fixtures can load
Then enable all Blameable relations in the schema.yml
and run
./doctrine generate-models-yaml
So models are generated with the correct relations
Regards
Tim