User-1079190493 posted
Hi,
I am trying to add a new entity to an existing array in an upshot viewmodel. The entity is JSON returned from the server and one of its properties is an array. This part works properly with all related entities mapped
var promo = {};
var promoType = {};
var promoModel = "Promo:#CodeFirst.Models";
upshot.map(json[0], promoModel, promo);
upshot.addEntityProperties(promo, promoModel);
However when I push the new upshot entity into the KO array it loses its array of child entities - just an empty array remains with all other properties ok.
issue.Promos.push(promo);
has anyone else had this problem or better yet resolved it?
Cheers
Joe