Hello @vadimdemedes. Thanks for this neat project!
How can I use the findOneAndUpdate() method that's inherited from mquery?
Or, is this not possible because findOneAndUpdate doesn't fall into the category of a query-condition methods (like all() or and(), but rather a query-method ..method (like find(), distinct()), which must be implemented in mongorito itself?
I can do it like this, but it seems like abuse (and the result is not an instance of the Mongorito model):
Hello @vadimdemedes. Thanks for this neat project!
How can I use the
findOneAndUpdate()
method that's inherited from mquery?Or, is this not possible because
findOneAndUpdate
doesn't fall into the category of a query-condition methods (likeall()
orand()
, but rather a query-method ..method (likefind()
,distinct()
), which must be implemented in mongorito itself?I can do it like this, but it seems like abuse (and the result is not an instance of the Mongorito model):
or more specifically: