Skip to content

Entity type 'Entity.Addresses#Address' is mapped to JSON and has a navigation to a regular entity which is not the owner #35115

Open

Description

Ask a question

	internal class Address
	{
		public string? City { get; set; }
		public string? Street { get; set; }
		public string? Building { get; set; }
		public string? Flat { get; set; }
		public string? PostalCode { get; set; }
		public virtual AddressUseKind UseEntry { get; set; } = null!; // <-- here.
	}

Entity.Addresses is ICollection<Address> and is mapped as an owned type to a JSON column.

Is there a technical reason this is not currently supported? Doesn't it just store FKs? Why can't it map that to JSON?

Include provider and version information

EF Core version: 8.0.11.
Database provider: (e.g. Npgsql.EntityFrameworkCore.PostgreSQL).
Target framework: (e.g. .NET 8.0-windows).
Operating system: Windows 10.
IDE: (e.g. Visual Studio 2022 17.11.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions