This is probably not the right place to ask for this so please point me in the right direction.
It would be useful to be able to add metadata to the Ottoman models so that they can be read by introspection and allow for metadata programming. For example; If I create a model and then try and add ‘hint’ and ‘required’ properties:
const test = ottoman.model("Test", {
foo: {type:'string', hint:'This is a required foo object', required:true}
})
Introspecting the model I get the following fields
[ SchemaField {
name: 'foo',
type: CoreType(string),
readonly: false,
default: undefined,
validator: undefined },
SchemaField {
name: '_id',
type: CoreType(string),
readonly: true,
default: [Function: autogenUuid],
validator: undefined } ]
The extra properties of foo are ignored.
Cheers,
Fabrice