Fabrizio Ruggeri

Results 91 comments of Fabrizio Ruggeri

Thank you. Your contribution is really appreciated!

Due to the way mongoose hooks work,it's not.possible to cover all the cases. I'll should probably find the time to cover at least the basic use case (no multi,no bulkwrite)...

In this case I think the best option is to disable automatic increment and manually increment the counter when needed. Look at the documentation: https://github.com/ramiel/mongoose-sequence#not-automatic-sequences A simple way is to...

Ok, I see your use case. So you'd want something like this: ```js UserSchema.plugin(AutoIncrement, { id:'student_counter', inc_field: 'user_id', condition: (user) => user.type === 'student' }); ``` I'm not sure this...

Yes the hook used is a pre-save hook, so the counter is incremented before the document is actually saved. This is safer than a post hook and better mimic the...

Can you send the schemas (relevant part) and the plugin instantiation? Can you please try to better format the code (use backtick \` or the button `< >`). Can you...

Also, is `primaryKey: true` part of mongoose :thinking: ? I think it's not, you have to define an index on the `id` field if you want to simulate the effect...

One good reason to think to support multi-tenant is that nex-auth is likely to be deployed on vercel. On vercel each deployment has several domains (a lot more if the...

> Same here. We're using a custom hook that looks almost identical to your example. We're using it to update the search results depending on the current page. > >...

This is still not working. To reproduce the problem you need to re-render `SpotlightProvider` after the actions have been registered. I updated the codesandbox to use latest mantine package https://codesandbox.io/s/reverent-leftpad-6i6fkz