Skip to content
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

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Conversation

loay
Copy link
Contributor

@loay loay commented Jun 22, 2017

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

@loay loay force-pushed the strictObjectIDCorercion branch 2 times, most recently from a72faad to ee70b2d Compare June 22, 2017 17:14
},
...
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have an example boot script to go with it?

@loay You can use the same example as I used for this issue

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo for definition

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

@ssh24 ssh24 left a 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.
Copy link
Contributor

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

@loay loay force-pushed the strictObjectIDCorercion branch from 0434604 to b5fedda Compare June 22, 2017 17:49
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.
Copy link
Contributor

@b-admike b-admike Jun 22, 2017

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: myModel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

myModelName actually :)

@loay loay force-pushed the strictObjectIDCorercion branch from b5fedda to 3e7b0bb Compare June 22, 2017 17:54
@loay loay merged commit 6d9e28c into master Jun 22, 2017
@loay loay deleted the strictObjectIDCorercion branch June 22, 2017 18:08
@loay loay removed the #review label Jun 22, 2017
@ssh24 ssh24 added this to the Sprint 38 - Apex milestone Jun 22, 2017
@ssh24 ssh24 added the apex label Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants