-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/fix chaining methods v2 #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that the cached records are being returned on the new ActiveQuery
object. Please have a look at the discussion in Slack.
@sbelknap-bf what's the scoop w/ this PR? |
Fixes #47 |
@rferg - what is the status of this? Are you dev complete? Can we get a run through QA on this? |
@JeffLuckett Yes this is dev complete as far as I know. |
@sbelknap-bf @rferg what's the latest here? do we just need to get some QA eyes on it? |
@spacechurro Yep. CI passed and I did some quick spot checks. |
Cool. @sbelknap-bf what feature or card can we attach it to so that we can get some QA on it? |
@rferg is there a trello card for the feature that originally identified the bug? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks solid to me. Nice work guys!
The general idea of this PR is that if I instantiate a query, such as
any subsequent queries chaining off the initial query, should not update the initial query.
but should instead leave the initial query untouched, and generate a new query instance and return the result of the new query.
Without the changes in this PR, the two expectations above would fail.
The reason for this change, is currently this type of modifying behavior can have unexpected results, in cases such as
To fix this, using any query methods on an existing query will now return a new instance of a query object, and leave the original untouched.