microsoft / microsoft/Analysis-Services

BPA Rules: Hide foreign keys update

Open
#234 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
732
Forks
433
PR merge metrics
No merged PRs in 30d

Description

Current definition of rule Hide Foreign Key is:
UsedInRelationships.Any(FromColumn.Name == current.Name and FromCardinality == "Many") and IsHidden == false

In my opinion, this definition is not correct because it also matches a primary keys of related tables. I believe the definition should be following:

UsedInRelationships.Any(FromTable.Name == current.Table.Name and fromColumn.Name == current.Name and FromCardinality == "Many") and IsHidden == false

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Find the implementation of the BPA "Hide Foreign Key" rule and inspect how UsedInRelationships is evaluated. Reproduce the case where a related table's primary key is matched, then verify that the rule restricts the relationship to the current table and column while preserving the IsHidden and many-cardinality conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.