Skip to content

Commit c51b182

Browse files
authored
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
1 parent d20cafa commit c51b182

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/EFCore.Jet.Data/AdoxSchema.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ public override DataTable GetRelations()
419419

420420
var relationName = (string)key.Name;
421421
var principalTableName = (string)key.RelatedTable;
422+
var keyType = (KeyTypeEnum)key.Type;
423+
if (keyType != KeyTypeEnum.adKeyForeign)
424+
{
425+
continue;
426+
}
422427

423428
var relationType = !_naturalOnly ? "MANY" : null; // we don't know what kind of relationship this is
424429

0 commit comments

Comments
 (0)