Closed mollenbu closed 9 months ago
I loaded the fixtures without our custom PurgerLoader and still got the same error "SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens".
@mollenbu just in case, I remember having this issue at some point with Doctrine on a specific PHP version. I think it was 7.4.16 or smth... So before digging any further into this, I suggest trying to change your PHP version see if that's the cause
Been running into the same issue (and same as #129). The changes introduced in 1.5.0 solved it for me but I'm currently vendor locked to version 1.4. Could it be possible to get a backport of those changes? It would be great for #207 to also be included, since I also needed it to solve my issues.
Thanks @theofidry!
It's been a while and presumably fixed in 1.5 so I'll be closing this.
We have an AbstractDataset class with a child called Box using class table inheritance in Doctrine. The Box class uses a discriminator field called "TYPE".
Similarly we have fixtures template for the AbstractDataset and box fixtures that inherit the template.
This is all working fine until,
We updated "fzaninotto/faker" with "fakerphp/faker" and it introduced this error.
When its trying to generate the sql to insert the fixture data, the identifier field from the AbstractDataset entity is being included in the field list. This should be an auto-generated field. This only happens when working with fixtures. If we create a test case using the Box class it runs fine.
Here is the error:
Our fixture setup is too complicated to use the built in loader and purger. So we have overridden the services "fidry_alice_data_fixtures.loader.simple" and "fidry_alice_data_fixtures.doctrine.purger_loader".
We know this is something we probably did with the overwridden loader and purger. We're looking for insight how to best tackle this problem. If anyone has some ideas on what to look for that would be greatly appreciated.
common_dataset.yml
box.yml
JoinedSubclassPersister.php
Box.php
AbstractDataset.php