codepunkt / mongoose-patch-history

Mongoose plugin that saves a history of JSON patch operations for all documents belonging to a schema in an associated 'patches' collection
MIT License
96 stars 21 forks source link

Always use mongoose instance from options.mongoose #85

Closed jdegger closed 2 years ago

jdegger commented 2 years ago

I use various plugins to add additional data types in my Mongoose config. For example we use uuid _id fields. This is all fine and plugs in very well but this project seems to use their own mongoose instance for creating the schema. Which breaks the _id field with uuid support.

This PR fixes that, does this cause any problems?

jdegger commented 2 years ago

resubmitted the PR as I edited in /lib before instead of /src

jdegger commented 2 years ago

This might even remove the need for mongoose as a dependency I think.