Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ben-Dev
Helper II
Helper II

NavigationPropertyNameGenerator's Relationship Details SingleTarget Field

Hello,

Sql.Database's option NavigationPropertyNameGenerator, if set, is expected to be set to a callback function. When invoked, this function is passed two arguments, the second of which is a list of records describing the various relationships that need a relationship column name generated.

Each of these records is in the shape of:

 

[
  SourceTableName = text,
  SourceKeys = {text},
  TargetTableName = text,
  TargetKeys = {text},
  SingleTarget = logical
]

 

What does the "SingleTarget" field signify? In my testing, it's always set to true.

Thank you,
Ben

1 ACCEPTED SOLUTION
rufengli
Microsoft Employee
Microsoft Employee

You can expect it always is set to true (unless you used MySql connector and created the report years ago).

View solution in original post

4 REPLIES 4
rufengli
Microsoft Employee
Microsoft Employee

Hi, @Ben-Dev ,

 

You should always set it to true.  The "false" option is needed for backward combatility and does not apply to SQL connector.

Hi rufengli,

 

Thanks, but this isn't an option I can set. 🙂 It's in data provided to me when the callback function is invoked by Microsoft code.

 

Maybe it would help if I asked the question this way: Will the values of SingleTarget that are passed to my NavigationPropertyNameGenerator callback always be set to true, regardless of the data connector being used?

 

Thanks,

Ben

rufengli
Microsoft Employee
Microsoft Employee

You can expect it always is set to true (unless you used MySql connector and created the report years ago).

Thank you, @rufengli!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.