propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

Quote primary table name if identifier quoting is enabled #1769

Closed nederdirk closed 3 years ago

nederdirk commented 3 years ago

With the latest master build we ran into the problem that COUNT(*)-queries to our order table failed. This patch ensures that the setting for identifier quoting is properly observed.

Note that I deliberately ignored the getSql helper-function in the test, as this behaviour is precisely what the getSql helper-function hides.

nederdirk commented 3 years ago

Was this a regression recently introduced?

I think so, as we didn't encounter the same problem before. However, I'm not entirely sure and I'm not interested in the finger-pointing game :smile_cat:

codecov-commenter commented 3 years ago

Codecov Report

Merging #1769 (db6641c) into master (1a3140e) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1769      +/-   ##
============================================
+ Coverage     87.87%   87.89%   +0.01%     
  Complexity     7826     7826              
============================================
  Files           267      267              
  Lines         22543    22543              
============================================
+ Hits          19810    19814       +4     
+ Misses         2733     2729       -4     
Flag Coverage Δ
5-max 87.89% <100.00%> (+0.01%) :arrow_up:
7.4 87.89% <100.00%> (+0.01%) :arrow_up:
agnostic 73.34% <100.00%> (ø)
mysql 69.89% <100.00%> (+0.01%) :arrow_up:
pgsql 69.82% <100.00%> (+0.01%) :arrow_up:
sqlite 67.81% <100.00%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Propel/Runtime/ActiveQuery/Criteria.php 89.97% <100.00%> (+0.44%) :arrow_up:

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 1a3140e...db6641c. Read the comment docs.

dereuromark commented 3 years ago

All good - if anything we would rather use this to improve our code review skills :) After all, we approved and merged without seeing this. Anyway, we do need a 2nd signoff on this to merge.