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

support lazy loading #2105

Merged
merged 4 commits into from
Jan 6, 2020
Merged

support lazy loading #2105

merged 4 commits into from
Jan 6, 2020

Conversation

dmitry-s
Copy link
Contributor

fixes #2104

@meltsufin meltsufin added the datastore GCP Datastore label Dec 30, 2019
@codecov
Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #2105 into master will decrease coverage by 7.91%.
The diff coverage is 81.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2105      +/-   ##
============================================
- Coverage     80.35%   72.44%   -7.92%     
+ Complexity     2120     1905     -215     
============================================
  Files           244      245       +1     
  Lines          6965     7016      +51     
  Branches        714      723       +9     
============================================
- Hits           5597     5083     -514     
- Misses         1069     1593     +524     
- Partials        299      340      +41
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 72.44% <81.42%> (-0.02%) 1905 <17> (+19)
Impacted Files Coverage Δ Complexity Δ
.../core/mapping/DatastorePersistentPropertyImpl.java 89.47% <100%> (-1.96%) 29 <2> (+2)
...mework/cloud/gcp/data/datastore/core/LazyUtil.java 73.33% <73.33%> (ø) 6 <6> (?)
...oud/gcp/data/datastore/core/DatastoreTemplate.java 87.37% <86.48%> (-9.24%) 120 <9> (-6)
...a/spanner/repository/query/SpannerQueryMethod.java 0% <0%> (-100%) 0% <0%> (-6%)
...ository/config/FirestoreRepositoriesRegistrar.java 0% <0%> (-100%) 0% <0%> (-3%)
...sitory/support/FirestoreRepositoryFactoryBean.java 0% <0%> (-100%) 0% <0%> (-4%)
...pository/support/FirestoreQueryLookupStrategy.java 0% <0%> (-100%) 0% <0%> (-2%)
...figure/config/GcpConfigBootstrapConfiguration.java 0% <0%> (-100%) 0% <0%> (-2%)
...restore/repository/query/FirestoreQueryMethod.java 0% <0%> (-100%) 0% <0%> (-2%)
...ository/config/DatastoreRepositoriesRegistrar.java 0% <0%> (-100%) 0% <0%> (-3%)
... and 56 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf8b909...aa9f81a. Read the comment docs.

Copy link
Contributor Author

@dmitry-s dmitry-s left a comment

Choose a reason for hiding this comment

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

from in-person review

@dmitry-s dmitry-s requested a review from dzou January 3, 2020 21:21
docs/src/main/asciidoc/datastore.adoc Outdated Show resolved Hide resolved
@@ -425,6 +425,7 @@ There are three ways to represent relationships between entities that are descri
* Embedded entities stored directly in the field of the containing entity
* `@Descendant` annotated properties for one-to-many relationships
* `@Reference` annotated properties for general relationships without hierarchy
* `@LazyReferenceCollection` similar to `@Reference`, but the entities are lazy loaded when the property is accessed (note that the children keys retrieved when the parent entity is loaded)
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention that it applies to collections and Optional?

@dmitry-s dmitry-s merged commit 4071c94 into master Jan 6, 2020
@dmitry-s dmitry-s deleted the datastore-lazy-load branch January 6, 2020 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
datastore GCP Datastore
Development

Successfully merging this pull request may close these issues.

Datastore lazy retrieval of reference collections
3 participants