-
Notifications
You must be signed in to change notification settings - Fork 14
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
T32139 default negative ids for new models #112
base: health_master
Are you sure you want to change the base?
T32139 default negative ids for new models #112
Conversation
…s-for-new-models # Conflicts: # package.json
…ew-for-negative-ids
…s-for-new-models # Conflicts: # package.json Ref T32139
Ref T32139
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.
TODO:
- Fix small typo
- Add documentation about when negative ids are supplied, and what now
null
means, and when isNew return true
dist/mobx-spine.cjs.js
Outdated
@@ -925,7 +926,7 @@ var Model = (_class$1 = (_temp$1 = _class2$1 = function () { | |||
|
|||
/** | |||
* A model is considered new if it does not have an id, or if the id is a negative integer. | |||
* @returns {boolean} True if the model id is not set or a negative integer | |||
* @returns {boolean} - True if the model id is not set or a negative integer |
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?
Ref T32139
Files in request body
…t-body Automatically convert files in data to the format understood by django binder
ref T34782
T34782 relations error
…ing a project to use negative ids Ref T32139
…-models # Conflicts: # src/Model.js Ref T32139
Ref T32139
…egative-ids-for-new-models # Conflicts: # dist/mobx-spine.cjs.js # dist/mobx-spine.es.js # package.json # src/__tests__/Model.js Ref T32139
…g_bug Fix with sorting bug
…egative-ids-for-new-models # Conflicts: # src/__tests__/Model.js Ref T32139
Ref T32139
Codecov Report
@@ Coverage Diff @@
## health_master #112 +/- ##
=================================================
+ Coverage 93.38% 93.59% +0.20%
=================================================
Files 5 5
Lines 862 843 -19
Branches 206 200 -6
=================================================
- Hits 805 789 -16
+ Misses 47 44 -3
Partials 10 10
Continue to review full report at Codecov.
|
This changes mobx-spine to automatically set negative ids for new models, it will also create a new negative id on every clear