Closed GoogleCodeExporter closed 8 years ago
Issue 72 has been merged into this issue.
Original comment by dwolvert
on 13 Nov 2010 at 3:19
Original comment by dwolvert
on 25 Feb 2011 at 2:01
To provide better protection against accidental or intentional HQL/JPQL
malformities and injection attacks, I think we should require more explicit
indication of custom expressions in Fields and Sorts.
For fields, require the OP_CUSTOM operator. If max or count or other
aggregating operator is required, it will need to be included in the expression
manually. Examples...
new Field("{firstName}||' '||{initial}||' '||upper({lastName})",
Field.OP_CUSTOM);
new Field("max(({top} - {bottom}) / 2)", Field.OP_CUSTOM);
For Sorts, it's a bit trickier. There is no operator so we'll add an additional
isCustom flag. This will be the first parameter of constructors. Examples...
new Sort(true, "cast({employeeno} as integer)");
new Sort(true, "abs({prop1} - {prop2})", true);
Sort.ascCustom("cast({employeeno} as integer)");
Sort.descCustom("abs({prop1} - {prop2})");
Original comment by dwolvert
on 28 Feb 2011 at 1:34
Original comment by dwolvert
on 28 Feb 2011 at 4:36
Original comment by dwolvert
on 1 Oct 2011 at 10:58
Original issue reported on code.google.com by
dwolvert
on 13 Nov 2010 at 3:18