I found a gap with the can.Model when a different id field is provided.
The destroy action is working correctly but not the update one: (CanJS
2.1.4 for Jquery)
Reviewing the code I think I found where the problem is. In the line 8405 where say:
Must be changed for:
At least that way it is working for me.
Regards,
Xevi.
- var CollectionType = can.Model.extend({
- findAll: 'GET /api/collectionType',
- findOne: 'GET /api/collectionType/{id}',
- create: 'POST /api/collectionType',
- update: 'PUT /api/collectionType/{id}',
- destroy: 'DELETE /api/collectionType/{id}',
- id: "Code"
- }, {});
Reviewing the code I think I found where the problem is. In the line 8405 where say:
- attrs[identity] = id;
Must be changed for:
- attrs.id = attrs[identity] = id;
At least that way it is working for me.
Regards,
Xevi.