Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdoX GetRelations returns all key types not just foreign keys #245

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

ChrisJollyAU
Copy link
Member

The GetRelations function in AdoXSchema manages to return results for all found keys on a table. This includes primary keys and unique keys as well as foreign keys.

We only want the foreign keys.

GetRelationsColumns already does this so this is just making it consistent.

The DAO Schema querying works as expected and only returns the foreign keys.

Picked up as part of #241 where user had a one-to-one relationship and the child table had a foreign key and unique key that came back with the same name. As part of processing the returned results it tried to process the result that originally came with the unique key and as it had no principal table, resulted in a warning being generated.

This ensures we don't get to that point and all GetRelation schema (AdoX and DAO) return consistent results

@ChrisJollyAU ChrisJollyAU merged commit c51b182 into CirrusRedOrg:master Jun 26, 2024
13 checks passed
@ChrisJollyAU ChrisJollyAU deleted the fixgetrelations branch June 26, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant