core
core copied to clipboard
fix(laravel): belongs-to-many relations dont have a get-foreign-key-name method
| Q | A |
|---|---|
| Branch? | 4.2 |
| Tickets | Closes #7587 https://github.com/api-platform/core/issues/7587 |
| License | MIT |
API Platform library tries to extract the foreign_key from all relations, but BelongsToMany relations don't have a getForeignKeyName() method, so it returns null. When API Platform tries to flip an array containing null values, PHP throws the error: array_flip(): Can only flip string and integer values, entry skipped.
Hi , i have same problem , when do you think you can merge ? this fix ?
@soyuka
sure thing is I need to add a test you can also just drop an example of model and request I'll add it (though any llm can do it inside the workbench and the functional tests)