dimanche 2 mai 2021

Ember Not returning correct serialiser for model on calling store.serializerFor method

I have two models , record-type and record-type-choice, when I call store.serilizerFor or lookupserializer for on modal record-type-choice , the serializer for record-type is returned? can you guys help me with what I might be doing wrong?

model - record-type-choice

export default DS.Model.extend({
  value: attr('string'),
  position: attr('number'),
  type: attr('string'),
  dependentIds: attr({
    defaultValue() {
      return {};
    }
  }),
  dependencyMappingId: attr('string'),
  editable: attr('boolean')

});

serializer record-type-choice


export default ApplicationSerializer.extend({
  normalize(typeClass, hash, prop) {
    return this._super(typeClass, hash, prop);
  }
});

record-type model


export default DS.Model.extend({
  // recordTypeId: attr('number'),
  value: attr('string'),
  accessibleRoleIds: attr({ defaultValue: () => [] })
  // permissionStatus: attr('string'),
  // meta: attr()
});



Aucun commentaire:

Enregistrer un commentaire