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

refactor(core): added a PopulatePath enum, to contain the special prop names in populate #5418

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

boenrobot
Copy link
Collaborator

@boenrobot boenrobot commented Apr 5, 2024

Currently, this includes just "*" and "$infer".
Places where "*" is used as an actual SQL query expression remain using the literal string "*".

@boenrobot
Copy link
Collaborator Author

boenrobot commented Apr 5, 2024

If this gets in, I can extend #5359 to resolve conflicts with any prop that for whatever reason the schema has defined as "*" or "$infer", or whatever else MikroORM may add in the future as a special value in "populate", and do so in a future proof fashion.

Site note: I'm not 100% why in some spots, specifying PopulatePath.ALL works, while others require `${PopulatePath.ALL}`... I tried to use PopulatePath.ALL everywhere where "*" is allowed while "$infer" is not, but that doesn't quite work always somehow. The lib builds even without these, but the tests don't. But since the aim is 0 BC breaks, I guess that should be OK.

@boenrobot boenrobot marked this pull request as draft April 5, 2024 13:37
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.69%. Comparing base (e32ae32) to head (40e98d5).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5418    +/-   ##
========================================
  Coverage   99.69%   99.69%            
========================================
  Files         238      238            
  Lines       17251    17254     +3     
  Branches     4003     3702   -301     
========================================
+ Hits        17199    17202     +3     
- Misses         51       52     +1     
+ Partials        1        0     -1     

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

@boenrobot boenrobot force-pushed the thePopulateSpecial branch 2 times, most recently from 477c100 to f5cfb02 Compare April 5, 2024 14:35
…p names in populate

Currently, this includes just "*" and "$infer".
Places where "*" is used as an actual SQL query expression remain using the literal string "*".
@boenrobot boenrobot marked this pull request as ready for review April 5, 2024 15:03
@B4nan B4nan merged commit 34cf370 into master Apr 5, 2024
11 checks passed
@B4nan B4nan deleted the thePopulateSpecial branch April 5, 2024 22:24
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