From edfbfd8e6cc75b1024f2f2705b987cdfbd16416d Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 3 Dec 2025 11:18:36 +0100 Subject: [PATCH] Update Profile.Id type and fix FK mapping in RecAction Changed the `Id` property in the `Profile` class from `short?` to `long` to support larger values and resolve a type mismatch with the `ProfileId` foreign key in the `RecAction` class. Removed the `[NotMapped]` attribute from the `Profile` navigation property in `RecAction` as the type mismatch issue has been resolved. Also removed the related TODO comment. These changes improve database schema consistency and integrity. --- src/ReC.Domain/Entities/Profile.cs | 2 +- src/ReC.Domain/Entities/RecAction.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ReC.Domain/Entities/Profile.cs b/src/ReC.Domain/Entities/Profile.cs index 47386bd..8f45ae6 100644 --- a/src/ReC.Domain/Entities/Profile.cs +++ b/src/ReC.Domain/Entities/Profile.cs @@ -9,7 +9,7 @@ public class Profile [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Column("GUID")] - public short? Id { get; set; } + public long Id { get; set; } [Column("ACTIVE")] public bool? Active { get; set; } diff --git a/src/ReC.Domain/Entities/RecAction.cs b/src/ReC.Domain/Entities/RecAction.cs index 9614ae5..fc92d1c 100644 --- a/src/ReC.Domain/Entities/RecAction.cs +++ b/src/ReC.Domain/Entities/RecAction.cs @@ -13,8 +13,6 @@ public class RecAction [Column("PROFILE_ID")] public long? ProfileId { get; set; } - // TODO: Remove [NotMapped] once ProfileId FK type mismatch is resolved. - [NotMapped] [ForeignKey("ProfileId")] public Profile? Profile { get; set; }