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

new Foo.List(Foo.findAll()) calls Foo.findAll twice #1074

Closed
Bajix opened this Issue Jun 12, 2014 · 2 comments

Comments

Projects
None yet
4 participants
@Bajix

Bajix commented Jun 12, 2014

It looks like in 2.1.1, findAll is getting called twice, the second time with a deferred passed. As a result, this will inadvertently make requests with the deferred serialized into the query.

http://jsfiddle.net/aPXFF/

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Jun 12, 2014

Contributor

Just pass an object which will automatically be the options passed to findAll:

new Foo.List({}); // Will do Foo.findAll()
Contributor

daffl commented Jun 12, 2014

Just pass an object which will automatically be the options passed to findAll:

new Foo.List({}); // Will do Foo.findAll()
@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jun 12, 2014

Contributor

Still probably a bug. If a deferred is passed, it should use the deferred.

Contributor

justinbmeyer commented Jun 12, 2014

Still probably a bug. If a deferred is passed, it should use the deferred.

@daffl daffl added this to the 2.1.3 milestone Jun 12, 2014

@daffl daffl added the Bug label Jun 13, 2014

@zkat zkat self-assigned this Jun 23, 2014

@zkat zkat closed this in 30d119f Jul 8, 2014

daffl added a commit that referenced this issue Jul 8, 2014

Merge pull request #1106 from sykopomp/1074-double-findAll-deferreds
Fixes #1074 - Only call findAll once if argument is a deferred

@Bajix Bajix unassigned zkat Oct 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment