Internal Website Search
51-100 of 200 resultsProblem with distinct select, order by and equivalent alias/attribute path when ordering the results of some projection when the order by expression is different (though logically ... ; + " order by s_location.id asc";   ... ; + " order by s.location.id asc";   | |
Strange behaviour with ORDER BY and IN performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as it should be (and usually is, except in this special combination-case). Ordering seems to be ignored if we order by a simple member (e.g. a String) being the Entity-ID and, at the same time, filter | |
java.lang.NullPointerException when using ORDER BY == 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK and returns the records from the DB, but obviously not in order . Here is the stack trace of the exception ... am not sure if this problem is related to the other as the query works if you remove the order by | |
ORDER BY problem, when String starts with language specific character 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 ... anaq x ObjectDB uses the ordinal Java String lexicographical order , which is based on the order | |
Cannot sort descending, when ordering by caluculated float in a method Hi, I have found an issue in ordering by a method. I have two entities : Invoice and InvoiceItem ... this query: (I know, it's not very efficient...) select i from Invoice i order by i.getPrice() desc/asc it gives the same order for desc and asc (every time asc) When the float is not calculated (only returned | |
How the sort order (in queries) works for non english letters? (we are Czech company). How the sort order works for international (for us 'czech') letters? Does the ordering respects the national requirements? Thank you for clarification ... dmarko David Marko ObjectDB uses the ordinal Java String lexicographical order , which is based on the order | |
NULL prefered in ORDER BY? Hi! Is there a way to NOT prefer NULL in Order BY? I.e. assume this: @Entity class Hint {   ... do something like SELECT FROM Test ORDER BY hint.name It orders ASC like this (assuming I've got ... supported. null values are smaller than any other value so they appear first in ordering | |
order by string with numbers Hi Anyone could help me I need to order a string for example user1, user2, ..., user1000 I ... 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 | |
Order in WHERE Clause affects behaviour on DATE/DATETIME columns("query", "%myQuery%"); I don't get any error! The order of the WHERE clauses obviously makes | |
Deleting JPA Entity Objects Existing entity objects can be deleted from the database either explicitly by invoking the remove method or implicitly as a result of a cascade operation. Explicit Remove In order to delete an object from the database it has to first be retrieved (no matter which way) and then in an active | |
Shared (L2) Entity Cache provides two properties that can be used in order to change the default behavior. javax.persistence | |
UPDATE SET Queries in JPA/JPQL UPDATE queries cannot include the GROUP BY, HAVING and ORDER BY clauses, but the WHERE clause | |
Paths and Types in JPQL and Criteria API , and they can be used in ordering . Navigation through Path Expressions A path expression always starts | |
GROUP BY and HAVING clauses The GROUP BY clause enables grouping of query results. A JPQL query with a GROUP BY clause returns properties of generated groups instead of individual objects and fields. The position of a GROUP BY clause in the query execution order is after the FROM and WHERE clauses, but before the SELECT | |
Locking in JPA can also be set for a query in order to lock all the query result objects. When a retrieval operation includes | |
Chapter 4 - JPA Queries (JPQL / Criteria) BY, HAVING, ORDER BY): Then the expressions that are used for building JPQL and criteria query | |
SSL Configuration to the file, and password , which specifies a password that is needed in order to use the file. Usually | |
Collation and String Order will affect the way strings are sorted in queries (with ORDER BY). Currently strings are always ordered by Unicode order , and a workaround that enables controlling the order is to use normalizing, as ... feature. Many CRMs, DMS and other systems requires correct collation when using order by clause. +1 for this ... dmarko David Marko | |
criteria api / embedded objects / where order to the order of the where clouse and the 2.7.4 wasn't. Unfortunatly I was not able to strip ... to the order of the where clause, meaning that the result set differs. As far as I understand there might be some performence issues related to the order but no different result set | |
Alias not used in ORDER BY 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.someStringProperty) This doesn't | |
javax.persistence.criteria.CriteriaQuery: AbstractQuery Since: JPA 2.0 List getOrderList () Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been specified. Modifications to the list do not affect the query. Return: the list of ordering expressions Since: JPA 2.0 Set getParameters () Return | |
javax.persistence.OrderBy the ordering of the elements of a collection valued association or element collection at the point when the association or collection is retrieved. The syntax of the value ordering element is an orderby_list ... ] [ASC | DESC] If ASC or DESC is not specified, ASC (ascending order ) is assumed. If the ordering | |
javax.persistence.OrderColumn a column that is used to maintain the persistent order of a list. The persistence provider is responsible for maintaining the order upon retrieval and in the database. The persistence provider is responsible for updating the ordering upon flushing to the database to reflect any insertion, deletion, or | |
javax.persistence.ColumnResult this annotation in the metadata. Example: Query q = em.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "i.name AS item_name, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25) AND ( order _item = i.id)", "OrderResults"); @SqlResultSetMapping | |
javax.persistence.criteria.CriteriaBuilder, predicates, orderings . Note that Predicate is used instead of Expression in this API in order ... - if an argument is a tuple- or array-valued selection item Since: JPA 2.0 Order asc ( Expression x) Create an ordering by the ascending value of the expression. Parameters: x - expression used | |
javax.persistence.FieldResult fields of an entity class. Example: Query q = em.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25) AND ( order _item = i.id)", "OrderResults"); @SqlResultSetMapping(name="OrderResults | |
javax.persistence.SqlResultSetMapping.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "i.name AS item_name, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25) AND ( order _item = i.id ... =com.acme. Order .class, fields={ @FieldResult(name="id", column=" order _id"), @FieldResult(name="quantity | |
CriteriaQuery.orderBy(o) - JPA Method o ) Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering , if any, is simply removed, and results will be returned in no particular order . The order | |
CriteriaQuery.orderBy(o) - JPA Method JPA Method in javax.persistence.criteria.CriteriaQuery CriteriaQuery orderBy ( Order ... o ) Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous | |
javax.persistence.OneToMany Customer class: @OneToMany(cascade=ALL, mappedBy="customer") public Set getOrders() { return orders ; } In Order class: @ManyToOne @JoinColumn(name="CUST_ID", nullable=false) public Customer getCustomer ... class: @OneToMany(targetEntity=com.acme. Order .class, cascade=ALL, mappedBy="customer") public Set | |
javax.persistence.NamedStoredProcedureQuery are specified by the parameters element. All parameters must be specified in the order in which they occur in ... class mappings or all via a set of result set mappings. The order of the specification of these mappings must be the same as the order in which the result sets will be returned by the stored | |
CriteriaBuilder.asc(x) - JPA Method JPA Method in javax.persistence.criteria.CriteriaBuilder Order asc ( Expression x ) Create an ordering by the ascending value of the expression. Parameters: x - expression used to define the ordering Return: ascending ordering corresponding to the expression Since: JPA 2.0 | |
CriteriaBuilder.desc(x) - JPA Method JPA Method in javax.persistence.criteria.CriteriaBuilder Order desc ( Expression x ) Create an ordering by the descending value of the expression. Parameters: x - expression used to define the ordering Return: descending ordering corresponding to the expression Since: JPA 2.0 | |
CriteriaQuery.getOrderList() - JPA Method JPA Method in javax.persistence.criteria.CriteriaQuery List getOrderList () Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been specified. Modifications to the list do not affect the query. Return: the list of ordering expressions Since: JPA 2.0 | |
CriteriaQuery.select(selection) - JPA Method type is specified. For example: CriteriaQuery q = cb.createQuery(String.class); Root order = q.from( Order .class); q.select( order .get("shippingAddress"). get("state")); CriteriaQuery q2 = cb.createQuery(Product.class); q2.select(q2.from( Order .class) .join("items") . join("product")); Parameters | |
Step 3: Define a Spring DAO Component getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return | |
Step 3: Define an EJB Session Bean Guest g ORDER BY g.id", Guest.class); return query.getResultList(); } } The GuestDao session bean (EJB | |
javax.persistence.EntityManager Object if there is only one column in the select list.) Column values are returned in the order ... must be specified in the order in which the result sets will be returned by the stored procedure ... in the order in which the result sets will be returned by the stored procedure invocation | |
javax.persistence.OrderBy.value_name] [ASC | DESC] If ASC or DESC is not specified, ASC (ascending order ) is assumed. If the ordering element is not specified, ordering by the primary key of the associated entity is assumed. Since: JPA 1.0 | |
javax.persistence.StoredProcedureQuery parameters in the order the REF_CURSOR parameters were registered with the query. In the simplest case ... , if any, will be retrieved in the order the REF_CURSOR parameter was registered with the query. Return ... will call execute on the query if needed. A REF_CURSOR result set, if any, will be retrieved in the order | |
javax.persistence.ConstructorResult element of the ConstructorResult annotation in the same order as that of the argument list ... Customer c, Orders o " + "WHERE o.cid = c.id " + "GROUP BY c.id, c.name", "CustomerDetailsResult ... order . Since: JPA 2.1 Class targetClass default null (Required) The class whose constructor is to be invoked. Since: JPA 2.1 | |
CriteriaQuery.multiselect(selectionList) - JPA Method corresponding to the elements of the list passed to the multiselect method, in the specified order ... of the list passed to the multiselect method, in the specified order . If the type of the criteria query ... the specified order . Parameters: selectionList - list of selection items corresponding to the results | |
CriteriaQuery.multiselect(selections) - JPA Method to the arguments of the multiselect method, in the specified order , will be instantiated ... . The elements of the array will correspond to the arguments of the multiselect method, in the specified order ... order . Parameters: selections - selection items corresponding to the results to be returned by the query | |
[ODB1] Chapter 3 - Persistent Classes aware classes must be enhanced in order to track persistent fields. ObjectDB must know | |
[ODB1] Chapter 1 - About ObjectDB with relational database concepts and the tables and columns defined for an application in order to perform | |
javax.jdo.Query, import statements, ordering and grouping specifications, result and result class, the range ... , parameter declarations, variable declarations, imports, ordering specification, uniqueness, result ... ... version of the method binds the named expressions in turn to parameters in the order in | |
javax.jdo.PersistenceManager of the PersistenceCapable class for use in the application. In order for the application to construct ... up, in the same order as the oids parameter. See Also: getObjectsById Since: JDO 2.0 Collection ... of the objects in the datastore will be validated. Return: the objects that were looked up, in the same order | |
javax.jdo.JDOHelper the parameter. The order of iteration of the returned Collection exactly matches the order of iteration ... element in the parameter. The order of instances of the returned array exactly matches the order ... the persistence unit name, in that order ; if name is null, blank or whitespace, it is interpreted as | |
javax.jdo.spi.JDOImplHelper) Get the field flags for a PersistenceCapable class. The order of fields is the same as for field ... class. The order of fields is the natural ordering of the String class (without considering ... class. The order of fields is the same as for field names. Parameters: pcClass | |
Query.addSubquery(sub,variableDeclaration,candidateCollectionExpression,parameters) - JDO Method the candidate class, filter, parameter declarations, variable declarations, imports, ordering ... to parameters in the order in which they are declared in the subquery, or in the order they are found in |