Internal Website Search

1-23 of 23 results

javax.persistence.OrderBy

JPA Annotation OrderBy Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies ... when the association or collection is retrieved. The syntax of the value ordering element is an orderby _list , as follows: orderby _list::= orderby _item [, orderby _item] orderby _item::= [property_or_field_name

javax.persistence.OrderBy.value

JPA Annotation Attribute in javax.persistence. OrderBy String value default "" An orderby _list . Specified as follows: orderby _list::= orderby _item [, orderby _item] orderby _item::= [property_or_field_name] [ASC | DESC] If ASC or DESC is not specified, ASC (ascending order) is assumed

JPA Entity Fields

Map . For an inverse list field, the order of the retrieved owner entities can be set by the OrderBy annotation: @Entity public class Department { @OneToMany ( mappedBy ="department") @ OrderBy ("name

ORDER BY clause (JPQL / Criteria API)

); Root c = q. from (Country.class); q. select (c); q. orderBy (cb. asc (c. get ("currency")), cb. desc (c. get ("population"))); Unlike other methods for setting criteria query clauses - the orderBy

Problem with @OrderBy

When I use @ OrderBy and supply multiple order fields I get and error when ObjectDB Explorer expands a instance of the entity. Example code: @Entity @Table(name="Defects", schema = "myDB") public ... ;   @OneToMany(mappedBy="defect")     @ OrderBy ("seqRel, noteSeq

CriteriaQuery.orderBy(o) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaQuery CriteriaQuery 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

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

JPA Query Structure (JPQL / Criteria)

, ...). Criteria ORDER BY  ( orderBy , Order , asc , desc ).

JPA Criteria API Queries

, avg , min , max , ...). ORDER BY clause ( orderBy , Order , asc , desc ). The links above are direct

How to convert a boolean to an int in the query?

;  q.select(intCaptial);         q. orderBy (cb.asc(intCaptial ... .as(Integer.class); q.select(intApproveEmail); q. orderBy (cb.asc(intApproveEmail)); query = em ... intApprovePhoneNumber = boolApprovePhoneNumber.as(Integer.class); q.select(intApproveEmail); q. orderBy (cb.desc

javax.persistence.OrderColumn

as part of the state of the entity or embeddable class. The OrderBy annotation should be used for ordering that is visible as persistent state and maintained by the application. The OrderBy annotation ... List transactionHistory; ... } See Also: OrderBy Since: JPA 2.0 Public Annotation Attributes String

javax.persistence.criteria.CriteriaQuery

has the same assigned alias Since: JPA 2.0 CriteriaQuery orderBy (List  o) Specify the ordering ... CriteriaQuery orderBy (Order... o) Specify the ordering expressions that are used to order the query

Activation error on Schema change

Hi, Is @ OrderBy annotation supported ? When I add this annotation to my entity I get an error, saying that I did not activate my ObjectDB (which I did) : Caused by: com.objectdb.o ... ; @ OrderBy , and actually any change to your schema may cause a similar exception. Please verify

Problem persisting a TreeSet field

an automatic query . You can define the field as List and use the  @ OrderBy annotation to refine

Problem with distinct select, order by and equivalent alias/attribute path

two queries are not legal because the orderby _item is not reflected in the SELECT clause of the query

Error during cascaded merge

= CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)     @ OrderBy

@OrderColumn issue

the OrderBy annotation, and if you are using an embedded collection (i.e. a collection which is not

In version 2.5.2_05 does not work greatest by Date

In earlier versions this query worked fine. In version 2.5.2_05 does not work . orderBy (cb.desc(cb.greatest(root.get("createDate").as(Date.class)))).distinct(true) Thank you for your help. galandor Orlov Sergey Please try build 2.5.2_06 that should fix this regression (of casting to Date ). support Support

Strange Error with Criteria API and Sorting

.Join; import javax.persistence.criteria.Root; public class Test_ OrderBy { public static void main ... = root.join("other");   query. orderBy (cb.asc(cb.upper((Expression ) (Expression ) otherJoin

NPE at com.objectdb.jpa.JpaQuery.getResultList

= query.from(MomentPayload.class); query.select(fromMomentPayload); query. orderBy (cb.desc ... ; query. orderBy (cb.desc(fromMomentPayload.get("dateTime")));        

Alias not used in ORDER BY

Hi, I am doing something simple like final Root from = criteria.from(T.class) final Path path = from.get("someStringProperty") final Expression upperPath = builder.upper((Expression ) path); upperPath.alias("TEST"); criteria.multiselect(from, path); criteria. orderBy (builder.asc(upperPath)) I

Null pointer exception being thrown from within ObjectDB.

;   orderBy (cb.desc(r.get("objectDbId")));     TypedQuery query = entityManager

ObjectDB 2.9.0

: / by zero error on query execution. Fixed a bug in applying  OrderBy annotation. Fixed opening context menu in the Explorer.