Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Update parent entities at validation time - the end of partial entities #2659

Merged
merged 4 commits into from
Jul 16, 2018

Conversation

richard-cox
Copy link
Contributor

  • previously when we fetched an entity/list of entities the validation process would fetch any missing parameters before the original entity/entities are stored.
  • for instance fetch a service instance, service is missing, fetch service and store in a service instance entity with it's only param ({ entity: { service: x} }) , finally return with full service instance and store in store ({ entity: { service: x, other: params, et: c} })
  • these partial entities caused or were a catalyst for a growing number of issues such as we'd fire off entity changed events when updating, cascading api requests where we'd try and populate itself and children repeatedly, etc
  • this pr now avoids the need to create partial entities by assigning the missing param to the parent entity at validation time... instead of in a partial entity in the store.

- previously when we fetch an entity/list of entities the validation process
will fetch any missing parameters before the original entity/entities are stored.
- for instance fetch a service instance, service is missing, fetch service and store in a service instance entity with it's only param, finally return with full service instance and store in store
- these partial entities caused or were a catalist for a growing number of issues
- issues such as we'd fire off entity changed events when updating, cascade calls where we'd try and populate itself and children repeatidly, etc
- this commit now avoids the need to correct them by assigning the missing param at validation time
@cfdreddbot
Copy link

Hey richard-cox!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@codecov
Copy link

codecov bot commented Jul 6, 2018

Codecov Report

Merging #2659 into v2-master will increase coverage by 0.01%.
The diff coverage is 25%.

@@              Coverage Diff              @@
##           v2-master    #2659      +/-   ##
=============================================
+ Coverage      47.94%   47.95%   +0.01%     
=============================================
  Files            597      597              
  Lines          25350    25338      -12     
  Branches        5735     5733       -2     
=============================================
- Hits           12154    12151       -3     
+ Misses         13196    13187       -9

@KlapTrap KlapTrap merged commit ef001fb into v2-master Jul 16, 2018
@nwmac nwmac deleted the remove-partial-entity-2 branch April 10, 2020 11:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants