-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document strictObjectIDCorecion flag #379
Conversation
a72faad
to
ee70b2d
Compare
}, | ||
... | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
@@ -181,6 +181,25 @@ make benchmarks | |||
|
|||
The results will be output in `./benchmarks/results.md`. | |||
|
|||
## strictObjectIDCoercion flag | |||
|
|||
In version 1.17.0, where the id is of string type, is being converted to ObjectID when the string length is 12 or 24 and has the format of an ObjectID i.e /^[0-9a-fA-F]{24}$/. To avoid this issue, the strictObjectIDCoercion flag should be set to true in the model-definiton file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo for definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: it is being converted
instead of is being converted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reformatted the whole sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
README.md
Outdated
@@ -181,6 +181,66 @@ make benchmarks | |||
|
|||
The results will be output in `./benchmarks/results.md`. | |||
|
|||
## strictObjectIDCoercion flag | |||
|
|||
In version 1.17.0, where the id of string type is being converted to ObjectID, when the string length is 12 or 24 and has the format of an ObjectID i.e /^[0-9a-fA-F]{24}$/. To avoid this issue, the strictObjectIDCoercion flag should be set to true in the model-definition file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the word where
0434604
to
b5fedda
Compare
README.md
Outdated
@@ -183,7 +183,7 @@ The results will be output in `./benchmarks/results.md`. | |||
|
|||
## strictObjectIDCoercion flag | |||
|
|||
In version 1.17.0, where the id is of string type, is being converted to ObjectID when the string length is 12 or 24 and has the format of an ObjectID i.e /^[0-9a-fA-F]{24}$/. To avoid this issue, the strictObjectIDCoercion flag should be set to true in the model-definition file. | |||
In version 1.17.0, where the id of string type is being converted to ObjectID, when the string length is 12 or 24 and has the format of an ObjectID i.e /^[0-9a-fA-F]{24}$/. To avoid this issue, the strictObjectIDCoercion flag should be set to true in the model-definition file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: In version 1.17.0, if you have an 'id' property of type string, it will be converted to ObjectID when its length is 12 or 24 and has the format of an ObjectID i.e /^[0-9a-fA-F]{24}$/.
README.md
Outdated
@@ -228,9 +228,9 @@ module.exports = function(app) { | |||
name: 'Bar', | |||
}], function(err, result) { | |||
if (err) throw err; | |||
console.log('\nCreated employees: ' + util.inspect(result, 4)); | |||
console.log('\nCreated instances of my model: ' + util.inspect(result, 4)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: myModel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
myModelName actually :)
b5fedda
to
3e7b0bb
Compare
Description
Setting up a proper workaround for mongodb 1.17 version bug when string type ids are being converted to objectIDs
Related issues
connect to https://github.com/strongloop-internal/scrum-apex/issues/146