Symfony fixture & many to many relationship (Doctrine)?

You need to load the fixtures in such an order that doesn't try to create a "child" record before a "parent" record for it exists in the database. When you load all the fixtures at once, it's creating illegal foreign-key referenced fields so it throws that error Maybe there's some clever way around it but I personally just load the fixtures separately, starting from the parent, by taking the fixture files out of the fixtures folder, running the standard load-data command, sticking the other fixture file back in, and repeating the command.

You need to load the fixtures in such an order that doesn't try to create a "child" record before a "parent" record for it exists in the database. When you load all the fixtures at once, it's creating illegal foreign-key referenced fields so it throws that error. Maybe there's some clever way around it but I personally just load the fixtures separately, starting from the parent, by taking the fixture files out of the fixtures folder, running the standard load-data command, sticking the other fixture file back in, and repeating the command.

Thanks! Will try it tonight – Cedric Dugas Dec 13 '10 at 19:13.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions