You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When JSqlParser is not on the class path, all three tests pass.
When JSqlParser is on the class path, the third tests fails with an exception:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement [Table "ALL_PROJECTS" not found; SQL statement:
SELECT * FROM all_projects ORDER BY name ASC fetch first ? rows only [42102-224]]
[SELECT * FROM all_projects ORDER BY name ASC fetch first ? rows only]; SQL [SELECT * FROM all_projects ORDER BY name ASC fetch first ? rows only].
Both the printed query "SELECT * FROM all_projects ORDER BY name ASC fetch first ? rows only" and the error message "Table "ALL_PROJECTS" not found" imply that the WITH clause
WITH all_projects AS
(
SELECT*FROM projects
)
has been lost while preprocessing the query in JSqlParserQueryEnhancer. This happens in public String applySorting(Sort sort, @Nullable String alias)
Thanks @quaff for linking the PR. We're currently looking into ways to mitigate the issue without (major/minor) version bumps for the upcoming service release.
This commit makes sure to render the entire statement after applying the sort expression via the QueryEnhancer. Previously only parts, the actual statement body, had been considered.
Closes: #3263
Original Pull Request: #3264
This commit makes sure to render the entire statement after applying the sort expression via the QueryEnhancer. Previously only parts, the actual statement body, had been considered.
Closes: #3263
Original Pull Request: #3264
Repository class:
Test class for the repository
When
JSqlParser
is not on the class path, all three tests pass.When
JSqlParser
is on the class path, the third tests fails with an exception:Both the printed query
"SELECT * FROM all_projects ORDER BY name ASC fetch first ? rows only"
and the error message"Table "ALL_PROJECTS" not found"
imply that the WITH clausehas been lost while preprocessing the query in
JSqlParserQueryEnhancer
. This happens inpublic String applySorting(Sort sort, @Nullable String alias)
JSqlParserQueryEnhancerBug.zip.
The text was updated successfully, but these errors were encountered: