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

Oracle doesn't query for relationships properly #52

Closed
NullEntity opened this issue Jan 4, 2019 · 2 comments
Closed

Oracle doesn't query for relationships properly #52

NullEntity opened this issue Jan 4, 2019 · 2 comments

Comments

@NullEntity
Copy link

inner join all_CONSTRAINTS b on a.r_constraint_name=b.constraint_name

This join should also be filtering on: AND a.r_owner=b.owner
If you have the same constraint in two different schemas the query will return a relationship between the tables on different schemas. Adding a test for this would probably be a good idea, but I'm not too sure on how to test it.

@jbogard
Copy link
Owner

jbogard commented May 2, 2019

PR?

FranksDevRepo pushed a commit to FranksDevRepo/Respawn that referenced this issue Sep 14, 2021
…nstraint" to expose problem mentioned in issue jbogard#52 (Oracle doesn't query for relationships properly)
FranksDevRepo pushed a commit to FranksDevRepo/Respawn that referenced this issue Sep 14, 2021
@FranksDevRepo
Copy link

FranksDevRepo commented Sep 14, 2021

I provided a PR for this issue since I ran into the same problem NullEntity mentioned on our test servers.
A possible work around is to invoke respawn by the schema owner. If respawn is invoked by system user, or a user with privileges on another schema, sometimes I experienced foreign key constraint violations on our test pipelines after calling respawn. I could track down the issue to using named foreign key constraints with same names in different schemas.
Hope this helps.

jbogard added a commit that referenced this issue Jan 10, 2022
Fix issue #52 "Oracle doesn't query for relationships properly"
@jbogard jbogard closed this as completed Sep 30, 2022
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

No branches or pull requests

3 participants