Kubide / mongoose-slug-generator

MIT License
30 stars 16 forks source link

doc.model is not a function #11

Open twoheaded opened 7 years ago

twoheaded commented 7 years ago

I get the following error:

TypeError: doc.model is not a function
    at makeUniqueCounterSlug (node_modules\mongoose-slug-generator\lib\slug-generator.js:142:9)
    at node_modules\mongoose-slug-generator\lib\slug-generator.js:91:21
    at node_modules\mongoose-slug-generator\node_modules\async\lib\async.js:181:20

when I try to add unique slugs for nested and parent schemas.

Can you help me with this problem?

YuriGor commented 5 years ago

Implemented in this fork Same as in MongoDB, unique slugs in nested arrays elements will be unique over collection on per-document basis, so inside nested array duplicate slugs will still be possible.

nikhillad01 commented 3 years ago

Implemented in this fork Same as in MongoDB, unique slugs in nested arrays elements will be unique over collection on per-document basis, so inside nested array duplicate slugs will still be possible.

This worked for me.. Thanks