Skip to content

fix: raise an error if a self reference is detected#42

Closed
bart-westenenk-bex wants to merge 3 commits intoEugZol:masterfrom
bart-westenenk-bex:41-fix-inner-database-table-shadowing
Closed

fix: raise an error if a self reference is detected#42
bart-westenenk-bex wants to merge 3 commits intoEugZol:masterfrom
bart-westenenk-bex:41-fix-inner-database-table-shadowing

Conversation

@bart-westenenk-bex
Copy link
Copy Markdown
Contributor

@bart-westenenk-bex bart-westenenk-bex commented Mar 26, 2026

This PR makes it impossible to make mistakes by joining the parent record in the where_exists scope. Doing this will result in the inner join table declaration shadowing the outer table declaration resulting in the exists subquery returning all records, thus basically reducing itself to a where (SELECT 1 FROM 'target_table')

refs #41

@bart-westenenk-bex bart-westenenk-bex changed the title fix: self reference in the where exist will be filtered fix: raise an error if a self reference is detected Mar 27, 2026
@bart-westenenk-bex bart-westenenk-bex force-pushed the 41-fix-inner-database-table-shadowing branch from e7686fc to 4ca2ed4 Compare March 27, 2026 12:10
@bart-westenenk-bex bart-westenenk-bex force-pushed the 41-fix-inner-database-table-shadowing branch from 1d703a7 to af37d0b Compare March 27, 2026 12:17
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.

1 participant