Count on `RoleMapping` results 0 always
Bug or Not!
When I count on RoleMapping the result is zero. Because principalId is string but mongodb connector considered it's to be an object-id.
So I have to change RoleMapping settings as adding to that.
I couldn't find anything in documentation for strictObjectIDCoercion, I find that in source code at : here
Additional information
$ node -e 'console.log(process.platform, process.arch, process.versions.node)'
linux x64 7.0.0
$ npm ls --prod --depth 0 | grep loopback
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
It's related to v1.18 connector mongodb and maybe the strictObjectIDCoercion settings not present on roleMapping.json. You should see this issue https://github.com/strongloop/loopback-connector-mongodb/issues/327
@pierreclr Thanks for reply.
I test with mongodb connector version 3.0.0 too and still the problem exists.
I override the RoleMapping settings and added strictObjectIDCoercion.
And also I think that settings should be for a property not the model.
Maybe we have some other properties which string yet.
And I close this issue regarding to your open issue