Open weierophinney opened 4 years ago
Given the recent uptick in Doctrine contribution to Apigility I would like to bump this up to a higher priority.
ping @jguittard
Originally posted by @TomHAnderson at https://github.com/zfcampus/zf-apigility-admin-ui/issues/109#issuecomment-256205342
For anyone needing a work-around, and you choose to create all your Doctrine endpoints at the same time, you may run the application through the php internal server php -S localhost:8080 -t public public
which is single threaded and will not cause a race condition.
When using Doctrine and creating a new service if more than one entity is selected a race condition occurs when both entities are submitted to be created. This is caused because creating a new resource invokes code generation and the two jobs are submitted simultaneously.
The jobs should use a promise object to run one at a time.
p.s. I thought this was already reported. It's been around forever.
Originally posted by @TomHAnderson at https://github.com/zfcampus/zf-apigility-admin-ui/issues/109