 33 | performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as ... ("Locations without selection criterion in descending order (by id): ");
em.createQuery("select l from Location l order by l.id desc", Location.class)
.getResultList().forEach(l |
 33 | Dear all, I have a problem with ORDER BY clause. I have a simple query:
select u from User u order by u.name When the name starts with "normal/english" character, records are ordered correctly ... to JPQL and JDOQL) you can use the Normalizer expression directly in the query ORDER BY clause |
 33 | Hi, I have found an issue in ordering by a method. I have two entities : Invoice and InvoiceItem ... ...) select i from Invoice i order by i.getPrice() desc/asc it gives the same order for desc and asc ... .createQuery(
"SELECT i FROM Invoice i ORDER BY i.getPrice() DESC");
List resultList |
 32 | The sql that works is
ORDER BY CAST(SUBSTR(username FROM 4) AS UNSIGNED) ASC
Using JPQL SELECT u FROM Users u ORDER BY SUBSTRING(u.username,4)*1 ASC If you have other alternative for JPA ... Hi Anyone could help me I need to order a string for example user1, user2, ..., user1000 I found |
 32 | Hi! Is there a way to NOT prefer NULL in Order BY? I.e. assume this:
@Entity
class Hint ... Test ORDER BY hint.name It orders ASC like this (assuming I've got three Test Entities whereas first ... are smaller than any other value so they appear first in ordering. Please fill a feature request |
 31 | (builder.asc(upperPath)) I would have expected the alias to be used in the ORDER BY clause, something like
SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY TEST However what I actually get as query string is
SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY UPPER($1 |
 30 | javax.persistence.criteria Interface Order An object that defines an ordering over the query results. Since: JPA 2.0 Learn how to use JPA Criteria API's Order in Chapter 4 of the ObjectDB/JPA manual. Expression getExpression() Return the expression that is used for ordering. Return |
 29 | javax.jdo.annotations Annotation Order Target: Fields (including property get methods) Annotation for the ordering component of an ordered container member, such as Java Collections Framework Array and List types and Java native array types. Corresponds to the xml element "order". Since: JDO 2.1 |
 28 | Method javax.persistence.criteria.Order Order reverse() Switch the ordering. Returns: a new Order instance with the reversed ordering Since: JPA 2.0 |
 27 | Method javax.persistence.criteria.Order Expression getExpression() Return the expression that is used for ordering. Returns: expression used for ordering Since: JPA 2.0 |