Accidentally using field instead of property for JSON metadata produce hard to understand exception #32939
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
File a bug
I (ok Github Copilot☺️ ) accidentially snuck in a field into a JSON metadata for a JSON column, instead of a proper property (get/set). This was during quite a large refactoring, so it took me quite some time before I spotted the error since the resulting exception did not point me in the right direction.
Could the DX be improved here please? Ideally there should be some error already when generating the migrations, but a more precise error thrown would help as well such as "The Baz field of Metadata should have been declared as a property with get/set".
Include your code
Include stack traces
Include the full exception message and stack trace for any exception you encounter.
Use triple-tick fences for stack traces. For example:
Include provider and version information
EF Core version: 8.0.1
Target framework: .NET 8.0
The text was updated successfully, but these errors were encountered: