I m trying to upgrade ember data to 1.13.16 with NewSerializerAPI for https://www.npmjs.com/package/ember-cli-couchdb(data serializer) Sample Paylaod which comes from couchdb EG.
{ loan:{ type:'LOAN TYPE', subproperties:[ { 'type':'myproperty', 'isrs':[ { type:'details', property:'name', elements:{ name:'myname' } } ] } ] } }
and the model loan:belongsTO(‘loan’) loan.js type:attr(‘string’), subproperties:hasMany(‘subproperty’) subproperty.js type:attr(‘string’) isrs:hasMany(‘isr’) isr: type:attr(‘string’) property(‘string’) elements:belongsTO(‘element’)
This is just one part of a document- THere are many nested relationship like above in one couchdb document The above addon correctly serializes and desrialises the payload to ember models for ember data verion 1.13.16 using old serializer api
How to go about doing this - tried EmbeddeRecordsMixin with newSerializer api but have fallen into in hard-to-debug ways.