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

Inconsistent results when extending parsed can.Models #1272

Closed
alexkrautmann opened this issue Oct 14, 2014 · 2 comments · Fixed by #1325
Closed

Inconsistent results when extending parsed can.Models #1272

alexkrautmann opened this issue Oct 14, 2014 · 2 comments · Fixed by #1325
Milestone

Comments

@alexkrautmann
Copy link

I've noticed the following issues when extending a can.Model:

  • When a parent Model defines can.Model.models, a child Model.findAll calls the success callback with a undefined list
  • When a parent Model defines can.Model.parseModel, a child Model.findAll calls the success callback with a list of unparsed model objects
  • When a parent Model defines can.Model.parseModels, a child Model.findAll calls the error callback with Error: Could not get any raw data while converting using .models

This seems similiar to #1246

Fiddle here.

@daffl
Copy link
Contributor

daffl commented Oct 22, 2014

It also looks like it is a regression. When I tested it, things worked in 2.1.3.

@daffl daffl added this to the 2.1.4 milestone Oct 22, 2014
@alexkrautmann
Copy link
Author

Hi daffl-

It might be important to note that all of these unexpected issues happen when findAll is defined in the parent models. This can be seen in the fiddle, but I didn't call it out in the original issue post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants