Form usage
Models
const Form_Parent = Fractale.create("Form_Parent", {
value: String
});
const Form_Child = Fractale.create("Form_Child", {
parent: Form_Parent,
value: String
});Run
const { Form_Parent, Form_Child } = module.exports.get();
const parent = new Form_Parent({ value: 'foo' });
const child = new Form_Child({ parent: parent.uuid, value: 'bar' });
_.test(child.value, 'bar', 'Error on form setter');
_.test(child.parent.value, 'foo', 'Error on form setter');
resolve(child);Results
Last updated
Was this helpful?