Open nategood opened 10 years ago
@mikermcneil and/or @particlebanana can we mark this noted and closed?
Did it ever find its way into the docs?
@nategood I'm not sure. I've marked it for review and someone will take a look.
This is still not in the docs. Marked as such.
I think this is done now. See https://github.com/balderdashy/waterline-docs/blob/master/models/data-types-attributes.md#defaultsto
To be honest I'm actually not aware of the callback option but I believe the OP means something like:
defaultsTo: function(cb) {
cb(null, uuid.v4());
}
Is this it @nategood?
The option to specify a callback for "defaultsTo" is quite handy. However, I happened to stumble across it by trial and error. Belongs in the docs: https://github.com/balderdashy/waterline-docs/blob/master/models.md#defaultsto