ObjectDB Database Search

51-100 of 200 results

Problem 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

Chapter 4 - JPA Queries (JPQL / Criteria)

BY, HAVING, ORDER BY): Then the expressions that are used for building JPQL and criteria query

SSL Configuration

the path to the file, and password , which specifies a password that is needed in order to use the file

jakarta.persistence.ColumnResult

.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( name = "OrderResults", entities

jakarta.persistence.FieldResult

.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 ... . Order .class, fields = { @FieldResult(name = "id", column = " order _id"), @FieldResult(name = "quantity

jakarta.persistence.SqlResultSetMapping

query or stored procedure. 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

jakarta.persistence.OneToMany

Set getOrders() { return orders ; } // In Order class: @ManyToOne @JoinColumn(name = "CUST_ID ... without using generics // In Customer class: @OneToMany(targetEntity = com.acme. Order .class, cascade = ALL, mappedBy = "customer") public Set getOrders() { return orders ; } // In Order class

jakarta.persistence.NamedNativeQuery

= "findWidgets", query = "SELECT o.id, o.quantity, o.item " + "FROM Order o, Item i " + "WHERE (o.item = i.id) AND (i.name = 'widget')", resultClass = com.acme. Order .class ) In more complicated cases, a result ... " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i.id)", resultSetMapping

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

jakarta.persistence.criteria.CriteriaQuery.orderBy(List)

orderBy (    List 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

jakarta.persistence.StoredProcedureQuery

to results corresponding to REF_CURSOR parameters in the order the REF_CURSOR parameters were registered ... result set, if any, is retrieved in the order the REF_CURSOR parameter was registered with the query ... , is retrieved in the order the REF_CURSOR parameter was registered with the query. Overrides Query

jakarta.persistence.NamedStoredProcedureQuery

must be specified in the order in which they occur in the parameter list of the stored procedure ... . The order of the specification of these mappings must be the same as the order in which the result sets ... about all parameters of the stored procedure. Parameters must be specified in the order in which they occur in

jakarta.persistence.ConstructorResult

annotation in the same order as that of the argument list of the constructor. Any entities returned as ... , " + "COUNT(o) as orderCount, " + "AVG(o.price) AS avgOrder " + "FROM Customer c, Orders o ... of the intended constructor, in order . Since: Jakarta Persistence (JPA) 1.0 Additional JDK methods inherited

jakarta.persistence.EntityManager

if there is only one column in the select list.) Column values are returned in the order ... arguments must be specified in the order in which the result sets is returned by the stored ... must be specified in the order in which the result sets is returned by the stored procedure

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering Returns: ascending ordering corresponding to the expression. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering Returns: descending ordering

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering

jakarta.persistence.criteria.CriteriaQuery.getOrderList()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaQuery List getOrderList() Return the ordering expressions in order of precedence. Returns empty list if no ordering ... of ordering expressions. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaQuery.select(Selection)

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

jakarta.persistence.Index

::= column_name [ASC | DESC] If neither ASC nor DESC is not specified, ASC , that is, ascending order ... : "" Since: Jakarta Persistence (JPA) 1.0 String columnList (Required) The columns included in the index, in order

jakarta.persistence.JoinColumn

Customer class @OneToMany @JoinColumn(name = "CUST_ID") // join column is in the table for Order public Set getOrders() { return orders ; } See Also: ManyToOne OneToMany OneToOne JoinTable

jakarta.persistence.EntityResult

.description " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i.id)", "OrderItemResults ... .acme. Order .class), @EntityResult(entityClass = com.acme.Item.class) } ) See Also: SqlResultSetMapping

jakarta.persistence.criteria.ListJoin

the string-based API may need to specify the type resulting from the Path.get operation in order ... an association or element collection for which an order column has been defined. Returns: expression

jakarta.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. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaQuery.multiselect(Selection...)

object corresponding to the arguments of the multiselect method, in the specified order ... the specified order . If the type of the criteria query is CriteriaQuery or if the criteria query ... , in the specified order . Parameters: selections - selection items corresponding to the results

jakarta.persistence.criteria.CriteriaQuery.multiselect(List)

the specified order , will be instantiated and returned for each row that results from the query ... to the elements of the list passed to the multiselect method, in the specified order . If the type ... to the multiselect method, in the specified order . Parameters: selectionList - list of selection items corresponding

jakarta.persistence.OrderColumn.name

Jakarta Persistence (JPA) Method in jakarta.persistence.OrderColumn String name (Optional) The name of the ordering column. Defaults to the concatenation of the name of the referencing property or field; " _ "; " ORDER ". Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.PluralJoin

the string-based API may need to specify the type resulting from the Path.get operation in order

jakarta.persistence.criteria.Path

the string-based API may need to specify the type resulting from the get operation in order to avoid

jakarta.persistence.criteria.MapJoin

-based API may need to specify the type resulting from the Path.get operation in order to avoid

jakarta.persistence.criteria.Root

the Path.get operation in order to avoid the use of Path variables. For example: CriteriaQuery q

jakarta.persistence.criteria.SetJoin

the string-based API may need to specify the type resulting from the Path.get operation in order to avoid

jakarta.persistence.criteria.CriteriaBuilder.Case

Jakarta Persistence (JPA) Interface in jakarta.persistence.criteria.CriteriaBuilder jakarta.persistence.criteria.CriteriaBuilder.Case Super Interfaces: Expression , Selection , TupleElement Interface used to build general case expressions. Case conditions are evaluated in the order in

jakarta.persistence.criteria.CollectionJoin

.get operation in order to avoid the use of Path variables. For example: CriteriaQuery q = cb.createQuery

jakarta.persistence.criteria.CriteriaBuilder.SimpleCase

Jakarta Persistence (JPA) Interface in jakarta.persistence.criteria.CriteriaBuilder jakarta.persistence.criteria.CriteriaBuilder.SimpleCase Super Interfaces: Expression , Selection , TupleElement Interface used to build simple case expressions. Case conditions are evaluated in the order in

jakarta.persistence.criteria.From

may need to specify the type resulting from the Path.get operation in order to avoid the use

jakarta.persistence.criteria.Join

the Path.get operation in order to avoid the use of Path variables. For example: CriteriaQuery q = cb

jakarta.persistence.AttributeOverride

order to specify it as part of the map key or map value. To override mappings at multiple levels

jakarta.persistence.AssociationOverride

that is being overridden in order to specify it as part of the map value. If the relationship