[
https://jira.jboss.org/jira/browse/JBSEAM-3550?page=com.atlassian.jira.pl...
]
Jarek Gilewski commented on JBSEAM-3550:
----------------------------------------
Hi,
Maybe we can add something like this
private static final String[] RESTRICTED_ORDER_COLUMNS = {
"name",
"email",
"issue.name"};
@Override
public List<String> getRestrictedOrderColumns() {
return Arrays.asList(RESTRICTIONS);
}
and use this array inside org.jboss.seam.framework.Query.sanitizeOrderColumn function ?
EntityQuery and ordering issue
------------------------------
Key: JBSEAM-3550
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3550
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.CR1
Reporter: Jarek Gilewski
Assignee: Norman Richards
Fix For: 2.1.0.GA
I cannot call
setOrderColumn("pi.payment.name"); // for joined tables
for EntityQuery.
I got
java.lang.IllegalArgumentException: invalid order column
at org.jboss.seam.framework.Query.sanitizeOrderColumn(Query.java:445)
at org.jboss.seam.framework.Query.setOrderColumn(Query.java:436)
I can see at Query.java that the column name is checked with pattern "\\w*$"
(ORDER_COLUMN_PATTERN) wich i guess don't allowe the dot in the order column name.
Can we chcenge the ORDER_COLUMN_PATTERN to allow ordering by related columns?
I think it should be something like this '^(\w+)(\.\w+)*$'.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira