Scott Robinson

Results 36 comments of Scott Robinson

If you're using `.save()` (for creating _or_ updating a document) then you should be able to use the pre/post save hooks. If you're using something like `.findOneAndUpdate()` then you'll run...

The underlying reason it doesn't work is because `.save()` is an instance method and `.findOneAndUpdate()` is a class method. Adding hook support to class methods will take a bit more...

Hmm ya it looks like the internal validation isn't called when using `loadOneAndUpdate`. Nice catch. I'll include this fix in the upcoming update. Thanks!

Yes, there is a lot of room for improvement on the errors it throws. Most aren't descriptive enough. I've added this to my to-do list. Thanks for pointing it out!

Hi, Can you give me an example that doesn't work as expected? I'm sure there are some cases that don't get handled properly. Here is an example that does show...

Yes, that would be a nice improvement for the validator. Right now Camo just throws the first error it finds. I'll add this to the todo list. Thanks!