You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Important note: these modifications will not break the current APIs behaviors.
We simplify the way we create schemas, models and types. It works well for defining simple classes and structure. Example:
constmm=runtime.require('metamodel');// defining a schemamm.schema('Person',{firstName: 'property',address: 'property'});// overriding the generated modelmm.model('Person',{firstName: 'string',address: 'address'});// defining a new typemm.type('address',{street: 'string',city: 'string'});// defining an enumeration typemm.type('city',['Paris','Rennes']);// model creationmm.create();// get the classconstPerson=runtime.require('Person');// create an instanceconstperson=newPerson({firstName: 'a name',address: {street: 'a street',city: 'Rennes'}});// use instanceperson.address().street();
The text was updated successfully, but these errors were encountered:
Important note: these modifications will not break the current APIs behaviors.
We simplify the way we create schemas, models and types. It works well for defining simple classes and structure. Example:
The text was updated successfully, but these errors were encountered: