@gjhawar wrote:
I have a ember model in which I have a belongsTo relationship like
export default DS.Model.extend({ name: DS.attr('string'), entityType: DS.belongsTo('entity-type', { defaultValue() { return {}; }, async: false }),
The problem is when I GET the model in the route it is assigning an ember generated id to the subtype in belongsTO relationship.
{ name: "jack" , "entityType" : { "code" : "codeA", "id" : "ember100"} }
Is there a way I can stop it from assigning an id. Is there a primary key concept for subtypes? And how to make sure these generated ids are not serialized on POST?
Posts: 1
Participants: 1