From 64f960140760ae9623ea54014fe433ff01eab73b Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Thu, 3 Jul 2025 17:04:02 -0700 Subject: [PATCH] Fix DiscoverParentChildRelationship properties list TypeDescriptor.GetProperties incorrectly get all properties for entityType, ignoring properties filtering set in OrmConfiguration.Conventions.GetEntityProperties --- Dapper.FastCrud/Mappings/AutoGeneratedEntityMapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dapper.FastCrud/Mappings/AutoGeneratedEntityMapping.cs b/Dapper.FastCrud/Mappings/AutoGeneratedEntityMapping.cs index c875d23..df50fca 100644 --- a/Dapper.FastCrud/Mappings/AutoGeneratedEntityMapping.cs +++ b/Dapper.FastCrud/Mappings/AutoGeneratedEntityMapping.cs @@ -119,7 +119,7 @@ private IEnumerable DiscoverParentChildrenRelati // this can be in the form of: // 1. as a marked property of the same type decorated with an InversePropertyAttribute pointing back to our nav property (can even be an entity and not a collection for one-to-one relationships) // 2. an unmarked property of type IEnumerable<> OR - var parentChildrenPropGroups = TypeDescriptor.GetProperties(entityType) + var parentChildrenPropGroups = OrmConfiguration.Conventions.GetEntityProperties(entityType) .OfType() .Select(prop => {