Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #57625 [DoctrineBridge] Make
EntityValueResolver
return null
…
…if a composite ID value is `null` (MatTheCat) This PR was merged into the 6.4 branch. Discussion ---------- [DoctrineBridge] Make `EntityValueResolver` return `null` if a composite ID value is `null` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT My use-case is the upsert of an entity identified by two values. I have an `update` route with these two values as route parameters, and a `create` route with only one. In that case the second value is `null` but the `EntityValueResolver` will still call the repository’s `find` method, resulting in a `MissingIdentifierField` exception: > The identifier [VALUE] is missing for a query of [ENTITY] This PR makes the `EntityValueResolver` return `null` in this case, like when a scalar ID is `null`. Commits ------- 87f18842a8 [DoctrineBridge] Make `EntityValueResolver` return `null` if a composite ID value is `null`
- Loading branch information