Reputation: 1817
I'm using autoform with methods. On server side, of couse, I have to use check(item, Schema.item)
method. Everything was fine, until I decided to add a field createdAt
with autovalue. Now I can't pass check() in the method, because this field is not formed, and I want to insert AutoValue ... what I have to do?
Upvotes: 0
Views: 389
Reputation: 91
You might need to call clean before you call check if you're not using collection2 which calls clean for you.
clean(doc);
clean() invokes your autoValue functions.
Upvotes: 0