orm icon indicating copy to clipboard operation
orm copied to clipboard

Apply source scope by default in any loader

Open tntrex opened this issue 4 years ago • 3 comments

tntrex avatar Jun 21 '21 15:06 tntrex

Codecov Report

Merging #191 (55d7978) into master (fc7ead8) will decrease coverage by 0.09%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #191      +/-   ##
============================================
- Coverage     94.48%   94.39%   -0.10%     
+ Complexity      937      936       -1     
============================================
  Files            81       81              
  Lines          2413     2409       -4     
============================================
- Hits           2280     2274       -6     
- Misses          133      135       +2     
Impacted Files Coverage Δ
src/Relation/Pivoted/PivotedPromise.php 89.36% <ø> (-0.23%) :arrow_down:
src/Select/JoinableLoader.php 87.64% <ø> (-2.36%) :arrow_down:
src/Select/RootLoader.php 100.00% <ø> (ø)
src/ORM.php 94.73% <100.00%> (-0.12%) :arrow_down:
src/Select/AbstractLoader.php 88.09% <100.00%> (+0.14%) :arrow_up:
src/Select/QueryBuilder.php 92.04% <100.00%> (ø)

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 fc7ead8...55d7978. Read the comment docs.

codecov[bot] avatar Jun 21 '21 15:06 codecov[bot]

Please explain what usecase is covered by this change?

https://github.com/cycle/orm/blob/master/src/Factory.php#L177 Scopes were attached by default at source level - so all repositories were reading them correctly. Select was created without a scope on purpose.

wolfy-j avatar Jun 22 '21 09:06 wolfy-j

Please explain what usecase is covered by this change?

I thought this more clear way to define scope on any loader, not just joinable. May be I get it wrong, but what is the purpose to not attach scope to select?

tntrex avatar Jun 22 '21 10:06 tntrex