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

fix(entity-generator): use Ref wrapper on all lazy properties #5252

Merged
merged 1 commit into from Feb 16, 2024

Conversation

boenrobot
Copy link
Collaborator

For convenience in the common case, when the identifiedReferences is set to true, lazy relations should also be wrapped by Ref,
thus simplifying what onInitialMetadata needs to do.

There should be no change when identifiedReferences is set to false.

Metadata hooks can selectively opt out of some Ref wrappers by setting Ref to false in onProcessedMetadata,
or ensure they never get Ref wrappers regardless of identifiedReferences by only adding lazy flags in onProcessedMetadata.

Since the docs are also touched anyway to clarify this behavior, listings about the recently added features are also added.

For convenience in the common case, when the identifiedReferences is set to true,
lazy relations should also be wrapped by Ref,
thus simplifying what onInitialMetadata needs to do.

There should be no change when identifiedReferences is set to false.

Metadata hooks can selectively opt out of some Ref wrappers
by setting Ref to false in onProcessedMetadata,
or ensure they never get Ref wrappers regardless of identifiedReferences
by only adding lazy flags in onProcessedMetadata.

Since the docs are also touched anyway to clarify this behavior,
listings about the recently added features are also added.
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d2186da) 99.74% compared to head (e49dacf) 99.74%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5252    +/-   ##
========================================
  Coverage   99.74%   99.74%            
========================================
  Files         222      222            
  Lines       16841    16842     +1     
  Branches     3588     4104   +516     
========================================
+ Hits        16798    16799     +1     
  Misses         43       43            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

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

otherwise lgtm

@B4nan B4nan merged commit 50311cb into master Feb 16, 2024
11 checks passed
@B4nan B4nan changed the title fix(entity-generator): use Ref on lazy relations fix(entity-generator): use Ref wrapper on all lazy properties Feb 16, 2024
@B4nan B4nan deleted the genLazyScalarRefs branch February 16, 2024 18:26
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.

None yet

2 participants