I can't seem to get this example
const postProps = {
title: 'Relations',
comments: [
{
content: 'Awesome!'
},
{
content: 'So cool!'
}
]
};
store.create('post', postProps, { pass: ['comments'] })
.then((post) => {
// done
post.id === post.comments[0].post_id; // true!
});
at https://www.js-data.io/docs/relations#section-deep-creating-relations to work.
Although the objects serialize properly, the base adapter's withoutSerialization call on create, createMany, update, etc... filters out the relations because it expects the whitelisted relations to be specified in opts.with instead of opts.pass.
https://next.plnkr.co/edit/IXtJWp3gDy3fgqfY?preview
I can't seem to get this example
at https://www.js-data.io/docs/relations#section-deep-creating-relations to work.
Although the objects serialize properly, the base adapter's
withoutSerializationcall oncreate,createMany,update, etc... filters out the relations because it expects the whitelisted relations to be specified inopts.withinstead ofopts.pass.https://next.plnkr.co/edit/IXtJWp3gDy3fgqfY?preview