Skip to content
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
Closed

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

Bajix opened this issue Jun 12, 2014 · 2 comments
Labels
Milestone

Comments

@Bajix
Copy link

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
Copy link
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
Copy link
Contributor

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 as completed in 30d119f Jul 8, 2014
daffl added a commit that referenced this issue Jul 8, 2014
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
Labels
Projects
None yet
Development

No branches or pull requests

4 participants