ramiel / mongoose-sequence

Sequence and autoincrement handling for mongoose
GNU General Public License v2.0
284 stars 56 forks source link

Added bug fix where reference_field couldn't be inside an object #98

Closed ghost closed 3 years ago

ghost commented 3 years ago

E.G:

doc = {
created: {by: 'me'}
}

If reference_field is 'created.by' would return null instead of 'me'. After this change, that bug is fixed.

ramiel commented 3 years ago

Great, thank you. Actually one of the few dependencies is lodash which has a get method very similar to your resolve, but it's perfect like this as well. I merge and release soon

ghost commented 3 years ago

Oh, i've started coding as a hobby like a year ago. I don't know lodash, if you think it is more clean to use it, go ahead! By the way, thank you for this library 🙏☺

ramiel commented 3 years ago

Your fix is available in version 5.3.1 :) Good job