I've been struggling for the past few days with primary keys and the last version of Ember Data.
I first read how to do it on the Breaking Changes file on GitHub, but it's apparently outdated. I tried several other ways (with the help of Peter Wagenet on IRC), but none of them seem to work.
I would like to make slug
my primary key on my model, and also since I'm working with MongoDB, I would like to use _id
instead of id
.
Has anyone figured out how to do this? My underlying problem is that model records get loaded twice when I do several App.MyModel.find()
on the model.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…