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
Runnable query is not runnable in DoctrineDataCollector #24782
Comments
Related to (or duplicate of) #24700? |
It's not a duplicate, this case is more general, i.e. it can apply to every time an object is used in a query (not only to an entity used as identifier). |
Since this has been labeled as a bug, @garak can you work on it ? |
What could be done here is making the
Although I think actually the problem is that parameters are replaced inside the query and not in a separate procedure, e.g. to get a runnable query, we just modify the one we have and fill in the placeholders with values. In my opinion, the runnable query should be a separate entity perhaps. |
…n runnable part of the query (Simperfit) This PR was merged into the 4.1-dev branch. Discussion ---------- [DoctrineBridge] DoctrineDataCollector comments the non runnable part of the query | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #24782 | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> ![img_2932](https://user-images.githubusercontent.com/3451634/33648180-f6c7a5ac-da58-11e7-8bf8-95fc943d16ff.jpeg) I think the idea in this ticket is good and it should be implemented. Could we go further by adding more things to this feature, or will it be ok to just comment out the un-needed part to make the kiri ![kiri](https://user-images.githubusercontent.com/3451634/33648278-5eccc830-da59-11e7-8034-a1b9efee7673.png) (french joke for query) runnable ? Commits ------- 42760d0 [DoctrineBridge] DoctrineDataCollector comments the non runnable part of the query
Unfortunately, this bug is still present in Symfony 4.4
as you can see, the query is not runnable at all, since the whole string (with the comment) is single-quoted, while the double-quoted uuid is escaped 😔 |
This is some kind of re-opening of #20673.
The implementations done in 3b4a8f3 missed the point.
Getting a runnable query like the following one:
is pretty useless, because it's obviously not runnable at all.
What I expect is a query like this one:
that is really runnable (e.g. I can copy&paste in some database client)
The text was updated successfully, but these errors were encountered: