-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve Comparison::CONTAINS: allow to use custom position for % and _ wildcard characters #1150
base: old-prototype-3.x
Are you sure you want to change the base?
Improve Comparison::CONTAINS: allow to use custom position for % and _ wildcard characters #1150
Conversation
…mparison::CONTAINS
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3328 We use Jira to track the state of pull requests and the versions they got |
your implementation is wrong. |
not very understand why wrong, And example: if I will search (escaped) or "original" also wrong? |
@Fedik the original is missing the escaping of |
but that is why I am confused by your comment 😄 ah, I understand, sorry 😄 ok, but here is problem, |
@Fedik I'm saying it should escape |
@stof sorry, made long editing of previous comment 😉 |
@Fedik your proposal of Your expectation is that some magic values turn |
@Ocramius thanks, this part was confusing for me, I thought only about SQL part, I very bad in Doctrine architecture. So this in case Comparison::CONTAINS:
return function ($object) use ($field, $value) {
return false !== strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value);
}; Then have no idea how to do this 😄 ... hm, build some Maybe some suggestion how to make this work? or really no way? |
@Fedik |
ok, so I made pull also for doctrine/collections#45 |
This pull prevent forced wrapping of the value in to
%
and allow to use the custom position for
%
and_
wildcard characters in caseComparison::CONTAINS
Allow to build the
contains
expressions like: