Skip to content

Can a global filter be applied at the engine level, as opposed to session? #6176

Discussion options

You must be logged in to vote

hey there -

with_loader_criteria() is very specific to the ORM and there are no plans for this construct to work with plain Core. the main strengths of with_loader_criteria() is that it accommodates complicated automated SQL concepts like table inheritance and relationship loading that are not otherwise capable of being intercepted and are specific to the ORM.

When you have straight Core select() objects, these are pretty simple to manipulate directly. Unlike the ORM, there are no additional relationship loader or extra SELECT statements being generated, so you only need look at the .selected_columns or .froms collection of a select() to know what its SELECTing from, and you can then appl…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ScissorHill
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6175 on April 01, 2021 02:17.