I would like to order a query by a function which uses properties of the class. Something like:
@entity
class A
{
private int id;
private String name;
public int StringLength()
{
return name.length();
}
}
And the sentence something like: select n from A order by name.StringLength()
. Is it possible?