On 28 Gru, 21:16, "Michael Bayer" <mike...@zzzcomputing.com> wrote: > > A query in the general can be against any number of individual columns, > mapped entities, or aggregate functions. It can be selecting from many > tables at once, as well as from other Query objects as subqueries. > Trying to guess if filter_by() happens to be selecting exactly a single > row primary key from all of that seems complicated. It would also be a > surprise that it very occasionally pulls from cache, but in most cases not > - all based on the particular structure of a query. > > If filter_by() did do that, in this specific case it still would not pull > from cache since the criterion would be against more than just the primary > key columns. I'd say the direction here is to not use get() if you would > like any filtering to be applied, including from this new option.
I understand. Thank you very much for the elaborate answer and the recipe. That was exactly what I was looking for. Thanks! Best regards, Adam -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.