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
In mysqal datasource,
When you run the above code, the queries written in Current Behavior are sorted.
However, I think it should be done like the query in Expected Behavior
Expected Behavior
SELECT place_id, user_id as member_id, pointFROM user_point
WHERE (user_point.place_id= ?)
AND ((place_id > ?) OR (place_id = ? AND user_id > ?)) # member_id -> user_idORDER BY place_id ASC, member_id ASCLIMIT ?
Current Behavior
SELECT place_id, user_id as member_id, pointFROM user_point
WHERE (user_point.place_id= ?)
AND ((place_id > ?) OR (place_id = ? AND member_id > ?))
ORDER BY place_id ASC, member_id ASCLIMIT ?
Context
when using jdbcPagingItemReader and PagingQueryProvider, paging and sorting are done based on the sortKey in the where clause.
If an alias is used in the select clause and designated as the sortKey, the column name used in the where clause becomes the alias, leading to an exception since the database cannot find it.
This situation is awkward. Typically, the reason for using aliases in a select clause is for use in an order by clause. However, using aliases for paging causes problems. So I think it might be necessary to modify the paging logic to use actual column names rather than aliases.
The text was updated successfully, but these errors were encountered:
In mysqal datasource,
When you run the above code, the queries written in
Current Behavior
are sorted.However, I think it should be done like the query in
Expected Behavior
Expected Behavior
Current Behavior
Context
when using jdbcPagingItemReader and PagingQueryProvider, paging and sorting are done based on the sortKey in the where clause.
If an alias is used in the select clause and designated as the sortKey, the column name used in the where clause becomes the alias, leading to an exception since the database cannot find it.
This situation is awkward. Typically, the reason for using aliases in a select clause is for use in an order by clause. However, using aliases for paging causes problems. So I think it might be necessary to modify the paging logic to use actual column names rather than aliases.
The text was updated successfully, but these errors were encountered: