You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EFCore 7 - SqlServer - DataAnnotation 'TypeName' and fluent API 'HasColumnType' is not being honored for aggregate type for which ToJson() is defined
#29587
Closed
shvmgpt116 opened this issue
Nov 16, 2022
· 1 comment
instead of data annotation is giving following error - Contact' cannot be used as a property on entity type 'Author' because it is configured as a navigation.
Please could someone clarify if default data types can be changed for JSON/Aggregate types or not?
If yes, what am I missing in my sample application.
If no, are there any future plans on supporting this?
I am using a sample application where I have defined
[Column(TypeName = "VARCHAR(500)")]
data annotation for entity property 'Contact'.EnsureCreated()
generates following create table script where columnName
honors data annotation but columnContact
does not.Using fluent API
instead of data annotation is giving following error -
Contact' cannot be used as a property on entity type 'Author' because it is configured as a navigation.
Here is my
OnModelCreating()
method-Please could someone clarify if default data types can be changed for JSON/Aggregate types or not?
If yes, what am I missing in my sample application.
If no, are there any future plans on supporting this?
Sample application
Provider and version information
EF Core version: 7.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.2.6
The text was updated successfully, but these errors were encountered: