Because can.Model instances represent server resources, it makes sense to keep a single object per id, such that multiple lists interacting with that resource will interact with the same object. The functionality is as expected, however if you're needing multiple instances that are different objects, then you're mixing your concepts of view-models and models, and should address this design issue differently. Generally, this would mean making a can.Map.extend that references your can.Model, yet treats it exclusively as a model. This is easily done with can.Component or otherwise with a custom setup function.
↧