ember-model icon indicating copy to clipboard operation
ember-model copied to clipboard

Support for ID-less embedded objects

Open wildchild opened this issue 12 years ago • 2 comments

First of all excuse me if this is not a right place for such issues.

It would be cool to support id-less associations. Consider models stored in NoSQL databases. Usually such models contains embedded associations without IDs. Using it in both ember-model and ember-data is a pain and impossible without crutches. Have you any plans to support such embedded associations in future?

How to implement? I think ember-model should not add such records to a store and probably provide a separate class "Ember.Embeddable". Such models shouldn't have CRUD methods, etc.

Probably I am not the one who cares. Did anyone found a solutions/workaround?

wildchild avatar Oct 29 '13 04:10 wildchild

I'm interested in hearing proposed solutions, but can be a tricky issue. I typically just define embedded objects as attrs, but they won't be dirty tracked automatically.

ebryn avatar Feb 21 '14 15:02 ebryn

My proposal for ember-data, Hope it helps. https://github.com/emberjs/data/pull/1234#issuecomment-27305845

wildchild avatar Feb 24 '14 10:02 wildchild