From c51b182962a40cbcf665b12d1d61f75c5fc47cc1 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Wed, 26 Jun 2024 23:57:16 +0800 Subject: [PATCH] AdoX GetRelations returns all key types not just foreign keys (#245) * GetRelations only needs to return rows for foreign keys and not unique or primary keys. This makes it match DAO --- src/EFCore.Jet.Data/AdoxSchema.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/EFCore.Jet.Data/AdoxSchema.cs b/src/EFCore.Jet.Data/AdoxSchema.cs index b66392a..e1ffbf8 100644 --- a/src/EFCore.Jet.Data/AdoxSchema.cs +++ b/src/EFCore.Jet.Data/AdoxSchema.cs @@ -419,6 +419,11 @@ namespace EntityFrameworkCore.Jet.Data var relationName = (string)key.Name; var principalTableName = (string)key.RelatedTable; + var keyType = (KeyTypeEnum)key.Type; + if (keyType != KeyTypeEnum.adKeyForeign) + { + continue; + } var relationType = !_naturalOnly ? "MANY" : null; // we don't know what kind of relationship this is