brikteknologier / seraph-model

thin model layer for seraph/neo4j (node.js)
MIT License
111 stars 28 forks source link

Ability to pass function to property defaults #96

Open vinerz opened 9 years ago

vinerz commented 9 years ago

Hello!

I'd wish to have a way to pass a function to default such as Date.now, so when the key is not set, Seraph fires it and set the key's value to its return value.

Thanks again, Vinicius

andyrichardson commented 8 years ago

Yes, if you look here, you'll see that you can set a default value within your schema.