-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
feat: generate Parse.Object.objectId
automatically when allowCustomObjectId
is enabled and no objectId
is passed
#1540
Conversation
I will reformat the title to use the proper commit message syntax. |
Parse.Object.objectId
automatically when allowCustomObjectId
is enabled and no objectId
is passedParse.Object.objectId
automatically when allowCustomObjectId
is enabled and no objectId
is passed
Thanks for opening this pull request!
|
Codecov ReportBase: 99.94% // Head: 99.94% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## alpha #1540 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 61 61
Lines 5955 5955
Branches 1360 1360
=======================================
Hits 5952 5952
Misses 3 3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Looks mostly good, just some minor refactoring
Co-authored-by: dblythy <daniel-blyth@live.com.au>
Co-authored-by: dblythy <daniel-blyth@live.com.au>
Thanks for reviewing @dblythy! I have refactored the tests with your suggestions. Can you check again please? |
Hi @dblythy! Were you able to have a look at the recent changes pushed to the PR? |
You might need to run |
Thanks. I’ll run and post the results. |
@dblythy, my bad. I have just fixed the syntax error and updated the PR. Please have a look now. |
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.
Sorry, I just worked out how to properly suggest 😂.
Almost there, @mtrezza can you allow the tests to run?
I had been careful enough this time while refactoring. Can you check yet again, @dblythy ? :) |
I will review again within 24 hrs 😊 |
Thank you 😊 |
Can you check the integration check? |
Hi @dblythy and @mtrezza! I did get some time to look into this PR today. I have pushed the following updates:
Turns out that we don't need the following checks in All the related tests seem to work fine now. |
Waiting for CI to pass |
CI has been completed successfully. |
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.
Looks good!
@dblythy Is this ready for merge also from your side? |
# [3.5.0-alpha.4](3.5.0-alpha.3...3.5.0-alpha.4) (2022-09-21) ### Features * generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5))
🎉 This change has been released in version 3.5.0-alpha.4 |
Thanks for your contribution!! 🔥 |
Hi @mtrezza! When can we expect version 3.5.0 to be released? |
The release cycle is monthly (around the beginning of every month): alpha -> beta -> release |
Got it. Thanks for letting me know @mtrezza 😊 |
# [3.5.0-beta.1](3.4.4...3.5.0-beta.1) (2022-10-25) ### Bug Fixes * `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](#1527)) ([53edcfd](53edcfd)) * `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7)) * creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862)) * initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e)) * remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d)) ### Features * add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec)) * add json option to query.each ([299fb0d](299fb0d)) * generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5)) * localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
🎉 This change has been released in version 3.5.0-beta.1 |
# [3.5.0](3.4.4...3.5.0) (2022-11-01) ### Bug Fixes * `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](#1527)) ([53edcfd](53edcfd)) * `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7)) * creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862)) * initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e)) * remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d)) ### Features * add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec)) * add json option to query.each ([299fb0d](299fb0d)) * generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5)) * localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
🎉 This change has been released in version 3.5.0 |
* `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](#1527)) ([53edcfd](53edcfd)) * `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7)) * creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862)) * initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e)) * remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d)) * add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec)) * add json option to query.each ([299fb0d](299fb0d)) * generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5)) * localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
New Pull Request Checklist
Issue Description
Enabling
allowCustomObjectId
forces all objects to have customobjectId
s instead of auto-generating when noobjectId
is passed, or whenobjectId
is null or undefined.Related issue: #1402
Approach
When
allowCustomObjectId
is enabled:objectId
has a custom value.objectId
has a value and is an empty string, throw 'objectId must not be empty' error.objectId
doesn't have a value, or is null or undefined, generateobjectId
automatically as ifallowCustomObjectId
were disabled.TODOs before merging