jeudi 30 juin 2016

Uncaught Error: Assertion Failed: You may not set `id` as an attribute on your model --- want to duplicate id attribute

I have a model called group having multiple attributes, I also want to save my id information to some other attribute because of some reasons to pass the model info to somewhere else.


import DS from 'ember-data';

var group = DS.Model.extend({

groupId : DS.attr('string'),//want to duplicate id here
groupName: DS.attr('string'),
groupRegion: DS.attr('string'),
groupCountry: DS.attr('string'),
groupSegment: DS.attr('string'),
groupSubSegment: DS.attr('string'),
isSelected: DS.attr('boolean'),
isExpand: DS.attr('boolean')

});

export default group;




Aucun commentaire:

Enregistrer un commentaire