-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add a QueryBuilder based Mapper #9444
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
Conversation
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1a4261e to
610c665
Compare
Codecov Report
@@ Coverage Diff @@
## master #9444 +/- ##
============================================
- Coverage 51.61% 51.57% -0.04%
- Complexity 25694 25712 +18
============================================
Files 1638 1639 +1
Lines 96318 96398 +80
Branches 1393 1393
============================================
+ Hits 49712 49716 +4
- Misses 46606 46682 +76
|
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looks great
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense 👍 - please add it to the docs.
| $getter = 'get' . ucfirst($property); | ||
| $value = $entity->$getter(); | ||
|
|
||
| $qb->setValue($column, $qb->createNamedParameter($value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SqlInjectionChecker Potential SQL injection detected - method: no child method
| $getter = 'get' . ucfirst($property); | ||
| $value = $entity->$getter(); | ||
|
|
||
| $qb->set($column, $qb->createNamedParameter($value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SqlInjectionChecker Potential SQL injection detected - method: no child method
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
I noticed when I wanted to log the queries we make that not all of them are logged. Then I remembered that the Mapper doesn't use the query builder yet. So I decided to add a new one.
We should probably add tests.