Skip to content

Replace OwnsOne() with ComplexProperty() for passkey data#65028

Merged
MackinnonBuck merged 1 commit intomainfrom
mbuck/use-complex-property
Jan 13, 2026
Merged

Replace OwnsOne() with ComplexProperty() for passkey data#65028
MackinnonBuck merged 1 commit intomainfrom
mbuck/use-complex-property

Conversation

@MackinnonBuck
Copy link
Member

Addresses ToJson() being deprecated for owned entities.

This change doesn't require customers to migrate their databases, so it's safe to modify the existing schema without introducing a new Identity store schema version.

Fixes #65018

Copilot AI review requested due to automatic review settings January 12, 2026 23:17
@github-actions github-actions bot added the area-identity Includes: Identity and providers label Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses the deprecation of ToJson() on owned entities in Entity Framework Core by replacing OwnsOne() with ComplexProperty() for passkey data configuration. The change ensures compatibility with newer EF Core versions while maintaining the existing database schema, requiring no customer database migrations.

Changes:

  • Updated Entity Framework Core model configuration to use ComplexProperty() instead of the deprecated OwnsOne() pattern for passkey data

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MackinnonBuck MackinnonBuck merged commit 76d6c0c into main Jan 13, 2026
31 of 32 checks passed
@MackinnonBuck MackinnonBuck deleted the mbuck/use-complex-property branch January 13, 2026 17:19
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Jan 13, 2026
@AndriySvyryd
Copy link
Member

The are some differences that could be impactful for some customers. E.g. there will no longer be an EntityEntry associated with the IdentityPasskeyData entity, the EntityEntry for IdentityUserPasskey should be used instead.

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

Labels

area-identity Includes: Identity and providers

Projects

None yet

4 participants