Skip to content

Commit

Permalink
AdoX GetRelations returns all key types not just foreign keys (#245)
Browse files Browse the repository at this point in the history
* GetRelations only needs to return rows for foreign keys and not unique or primary keys. This makes it match DAO
  • Loading branch information
ChrisJollyAU committed Jun 26, 2024
1 parent d20cafa commit c51b182
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EFCore.Jet.Data/AdoxSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,11 @@ public override DataTable GetRelations()

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

Expand Down

0 comments on commit c51b182

Please sign in to comment.