Commit 24ef8e1
committed
bug #57625 [DoctrineBridge] Make
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`EntityValueResolver return null if a composite ID value is null (MatTheCat)File tree
2 files changed
+17
-0
lines changed- ArgumentResolver
- Tests/ArgumentResolver
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
0 commit comments