Skip to content

Conversation

@maumar
Copy link
Contributor

@maumar maumar commented Mar 14, 2023

We were not updating usedAliases list as we uniquify tabke aliases after combining two sources because of JOIN. If the resulting query also needs owned type expanded (when owned type is mapped to a separate table - this expansion happens in translation rather than nav expansion), additional table generated could have incorrect alias. Fix is to update the usedAliases list as we make changes to aliases, so that when new tables are added we generate new aliases correctly.

Fixes #30358

@maumar maumar requested a review from roji March 14, 2023 20:46
@maumar
Copy link
Contributor Author

maumar commented Mar 14, 2023

@ajcvickers patch? it's a regression from 6 and fix is small/safe.

@ajcvickers
Copy link
Contributor

@maumar Sure, sounds like a good candidate.

…tem with the same key has already been added)

We were not updating usedAliases list as we uniquify tabke aliases after combining two sources because of JOIN. If the resulting query also needs owned type expanded (when owned type is mapped to a separate table - this expansion happens in translation rather than nav expansion), additional table generated could have incorrect alias.
Fix is to update the usedAliases list as we make changes to aliases, so that when new tables are added we generate new aliases correctly.

Fixes #30358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate table alias in generated select query (An item with the same key has already been added)

4 participants