-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BUG] Expression function replace SQL is not correct position #66
Comments
@ldcuong Very sorry for late reply. This behavior is limitation using this library because use textual template feature(CSS mode) of the Thymeleaf to parse SQL template. As workaround, there are following two solutions. Solution 1 (This solution is your suggestion)Add line break character after Solution 2Add e.g)
translated to follows:
|
We'll add the explanation for this limitation and workaround on reference documentation. |
Add explanation for likes.escapeClause() limitation in doc
I using below version:
When using Expression Function in mybatis thymeleaf.
Example:
SELECT * FROM area WHERE NAME LIKE 'Tara%' /*[(${#likes.escapeClause()})]*/ ORDER BY ID
Output result:
SELECT * FROM area WHERE NAME LIKE 'Tara%' escape '\'
Expected result:
SELECT * FROM area WHERE NAME LIKE 'Tara%' escape '\' ORDER BY ID
ORDER BY ID will be removed, it will be replace all character before comma in same line make sql incorrect.
If we format SQL by line -> SQL will be correct.
Example:
The text was updated successfully, but these errors were encountered: