You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a particular collection that has a function for determining which model should be created instead of a model object as described in the documentation. However, I've run into an issue when fetchById is called for a model in that collection.
In the ampersand-collection-rest-mixins.js method fetchById() the line:
idObj[this.model.prototype.idAttribute] = id;
seems to assume that the model property will not be a generic function but instead some type of Ampersand-Model object. Has anyone run into this use case and if so what did they do to solve it?
The text was updated successfully, but these errors were encountered:
I ran into the same problem (AmpersandJS/ampersand-collection-rest-mixin#14). I think the best workaround will be to use the collection's mainIndex as a fallback in this line. I will issue a PR soon.
I have a particular collection that has a function for determining which model should be created instead of a model object as described in the documentation. However, I've run into an issue when fetchById is called for a model in that collection.
In the ampersand-collection-rest-mixins.js method fetchById() the line:
seems to assume that the model property will not be a generic function but instead some type of Ampersand-Model object. Has anyone run into this use case and if so what did they do to solve it?
The text was updated successfully, but these errors were encountered: