Kubide / mongoose-slug-generator

MIT License
30 stars 16 forks source link

Avoid new slug generation while update (model.save) #13

Open shrikantr-iprogrammer opened 6 years ago

shrikantr-iprogrammer commented 6 years ago

First I like to thankyou for create this beautiful plugin. When we do a insert operation it works fine. But at the time of update where I'm using findOne followed by Save it changes the slug again. I don't want slug fields to be changed ever. So can we avoid this?

YuriGor commented 5 years ago

There is a permanent flag, but it's not documented. You can see some docs for this flag in my fork's readme - it should work same in original plugin too.