Commit c4aa7e0
Fix: Return byte[] type mapping for JsonTypePlaceholder
When EF Core passes JsonTypePlaceholder (for complex JSON types), return a
MySqlJsonTypeMapping<byte[]> instead of MySqlJsonTypeMapping<string>.
This makes ClrType != typeof(string), so the CustomizeDataReaderExpression
logic correctly converts string to MemoryStream for complex JSON types.
Regular JSON columns still use MySqlJsonTypeMapping<string> with no conversion.
This resolves both issues:
- Complex JSON types get string → MemoryStream conversion (fixes coercion error)
- Regular JSON columns stay as strings (no SQL generation issues)
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>1 parent 2f2e9b3 commit c4aa7e0
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
324 | | - | |
| 327 | + | |
| 328 | + | |
325 | 329 | | |
326 | 330 | | |
327 | | - | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
0 commit comments