We have been unable to upgrade for a while, and now that we finally got the chance to go from 5.3 to the latest, below change from 5.8 has broken several queries we have. Here's the basics of what we are doing:
person_1 = Person.from_self(:alias => :person_1). where(...some conditions...) person_2 = Person.from_self(:alias => :person_2). where(...some_conditions...). exclude(Sequel[:person_2][:id] => person_1.select(Sequel[:person_1][:id])) Because the from_self query is now cached, the second query now uses person_1 as the alias, which breaks everything. It does not seem like there is an option to turn the caching off. I would rather not monkey patch around this, especially because I recognize the performance gain this will bring. Is there a way of aliasing a table other than using from_self? What the #as function does for a column would fulfill our needs if it could also be applied to a table. I have never liked using from_self for this purpose, but I've never found a better way to do it. Thanks. On Tuesday, May 1, 2018 at 2:50:21 PM UTC-4, Jeremy Evans wrote: > > Sequel 5.8.0 has been released! > > = Other Improvements > > * The dataset returned by the following dataset methods is cached, > which can improve performance significantly in certain cases: > > * #distinct (without arguments or block) > * #from_self (without options) > * #lateral > * #qualify (without argument) > * #returning (without arguments) > * #select_all (without arguments) > > > Thanks, > Jeremy > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
