modeling icon indicating copy to clipboard operation
modeling copied to clipboard

nested models

Open ahdinosaur opened this issue 10 years ago • 0 comments

hey, i stumbled on modeling and i like how it looks. :)

is there a way to use a model in another model?

possible syntax that might already work:

var Address = Modeling("Address", {
  street: {
    label: 'Street',
    description: 'The name of the street',
    type: 'string',
    rules: [
      ['required']
    ],
  },
  ...
});

var Person = Modeling("Person", {
  address: {
    type: Address,
  },
  ...
});

if this does already work, can we add it to the documentation?

ahdinosaur avatar Jul 02 '14 00:07 ahdinosaur