pouchdb-community / ember-pouch

PouchDB/CouchDB adapter for Ember Data
Apache License 2.0
281 stars 76 forks source link

Getting "Cannot read property 'rev' of undefined" when trying to add rev field to a mixin #245

Open BMahabir opened 5 years ago

BMahabir commented 5 years ago

I don't want to add the rev field to a mixin, but if I don't, I get the error for it as if it was a model :

Please add a `rev` attribute of type `string` on the AssignableNote model.

This probably because I have a model that uses that mixin :

import AssignableAction from 'erm/mixins/assignable-action';
import AssignableNote from 'erm/mixins/assignable-note';
import Model from 'ember-pouch/model';

export default Model.extend(AssignableAction, AssignableNote, {
  org: DS.belongsTo('org'),
  name: DS.attr(),
  email: DS.attr(),
});

Any help appreciated -- thanks!

backspace commented 5 years ago

Does this happen even if you add a rev to the model that actually extends an Ember Pouch model?