Commit c9d31cb
Fix: Use DbType.String instead of null to enable SQL column projection
Changed MySqlStructuralJsonTypeMapping constructor to pass `System.Data.DbType.String`
instead of `dbType: null` to match SQL Server's SqlServerStructuralJsonTypeMapping.
ROOT CAUSE: The empty column projections (`, ,`) were caused by passing `dbType: null`.
EF Core's SQL generator needs the DbType to determine how to project columns in SELECT
statements. Without it, the generator cannot map JsonTypePlaceholder to actual column
names, resulting in empty SQL fragments.
SQL Server uses `DbType.String` with storeType="nvarchar(max)" or "json".
PostgreSQL likely does the same (needs verification).
This should resolve the SQL syntax errors while maintaining the string→MemoryStream
conversion for data reading.
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>1 parent 4448ed5 commit c9d31cb
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments