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

Issue v1/add singe model null refs #849

Open
wants to merge 6 commits into
base: release/v1
Choose a base branch
from

Conversation

DarkoKukovec
Copy link
Member

Please select all that apply:

  • This PR contains a new feature
  • This PR updates an existing feature
  • This PR contains bugfixes
  • This PR contains all the relevant tests
  • This PR creates a breaking change

Please describe the differences between the current and new behavior

Copy link
Member Author

@DarkoKukovec DarkoKukovec left a comment

Choose a reason for hiding this comment

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

The diff in PureCollection.ts is quite big because of the prettier changes. I marked all real changes there.

The other relevant change is in utils.ts

@@ -443,7 +491,9 @@ export class PureCollection {

const existingModel = this.findOne(modelType, modelId);
if (existingModel) {
updateModel(existingModel, model);
if (!insertOnly) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This has changed

if (model instanceof Array) {
model.forEach((item) => {
this.__insertModel(item, type, id);
this.__insertModel(item, type, id, insertOnly);
Copy link
Member Author

Choose a reason for hiding this comment

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

This has changed

const modelInstance = upsertModel(data, type, this);
this.__insertModel(modelInstance, type);
this.__insertModel(modelInstance, type, undefined, true);
Copy link
Member Author

Choose a reason for hiding this comment

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

This has changed

@DarkoKukovec DarkoKukovec requested a review from isBatak May 12, 2022 08:26
@DarkoKukovec DarkoKukovec force-pushed the issue-v1/add-singe-model-null-refs branch 3 times, most recently from 916a435 to 88c96a4 Compare May 12, 2022 08:35
@DarkoKukovec DarkoKukovec force-pushed the issue-v1/add-singe-model-null-refs branch 2 times, most recently from da3c137 to de01aa4 Compare May 12, 2022 08:51
@isBatak isBatak force-pushed the issue-v1/add-singe-model-null-refs branch 2 times, most recently from 8fb747e to de01aa4 Compare May 12, 2022 09:10
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.

1 participant