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 ... ;      new Location(" 1 ", "A"),         new ... ;  new Street(null, "s2", locations.get( 1 )),         new Street

JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

I'm trying to have the guestbook example running in the following environment: jboss as 7. 1 . 1 final oracle jdk 1 .7.0_04 maven 3.0.4 objectdb 2.4.0_04 installed as a module of jboss No IDE is used ... .getAll",          query="select g from guest.Guest g order

java.lang.NullPointerException when using ORDER BY

We are using ObjectDB 2.5. 1 _04. The following query causes an internal null pointer exception ... == 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

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

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

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 ... } and third one to NULL: Test 3 (with hint = NULL) Test 1 (with hint = A ) Test 2 (with hint = B) And descending: Test 2

order by string with numbers

  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

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 ... using the Play Framwork and JPA and use following libraries: "mysql" % "mysql-connector-java" % "5. 1

Issue deploying J6EE/Eclipse/Glassfish example to TomEE 1.5.1

In order to get past TomEE ignoring objectdb.jar, I tried using the objectdb-jee.jar.  It seems to be hardcoded to assume it is being deployed into JBoss AS: ....snip.... Caused by: com.objectdb.o.UserException: Failed to use JTA (TransactionSynchronizationRegistry is not found) at com

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

Index Definition

is an ordered map data structure that ObjectDB maintains in the file system, not in memory. The B ... scan instead of iterating over all entities. Furthermore, if the field order in the index definition matches the field order in the WHERE clause, ObjectDB can perform a more efficient range scan

jakarta.persistence.criteria.MapJoin

Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 ... Persistence (JPA) 1 .0 Expression cast ( Class type ) Cast this expression to the specified type ... Persistence (JPA) 1 .0 Predicate equalTo ( Expression value ) Create a predicate to test

jakarta.persistence.criteria.PluralJoin

Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression as ( Class type ) Perform ... expression of the given type. See Also: .cast(Class) Since: Jakarta Persistence (JPA) 1 .0 Expression cast ... Persistence (JPA) 1 .0 Fetch fetch ( SingularAttribute attribute , JoinType jt ) Create a fetch join

jakarta.persistence.criteria.SetJoin

Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression as ( Class type ) Perform ... expression of the given type. See Also: .cast(Class) Since: Jakarta Persistence (JPA) 1 .0 Expression ... . Since: Jakarta Persistence (JPA) 1 .0 Fetch fetch ( SingularAttribute attribute , JoinType jt ) Create a fetch

jakarta.persistence.criteria.CollectionJoin

Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression ... Persistence (JPA) 1 .0 Expression cast ( Class type ) Cast this expression to the specified type, returning ... : the resulting fetch join. Since: Jakarta Persistence (JPA) 1 .0 Fetch fetch ( SingularAttribute attribute

jakarta.persistence.criteria.Join

Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression ... Persistence (JPA) 1 .0 Expression cast ( Class type ) Cast this expression to the specified type ... : the resulting fetch join. Since: Jakarta Persistence (JPA) 1 .0 Fetch fetch ( SingularAttribute attribute

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 ... StoredProcedureParameter Since: Jakarta Persistence (JPA) 2. 1 Public Instance Methods QueryHint[] hints () Query

jakarta.persistence.criteria.Root

Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1 .0 ... Persistence (JPA) 1 .0 Expression cast ( Class type ) Cast this expression to the specified type ... : the resulting fetch join. Since: Jakarta Persistence (JPA) 1 .0 Fetch fetch ( SingularAttribute

jakarta.persistence.criteria.From

. Since: Jakarta Persistence (JPA) 1 .0 Expression as ( Class type ) Perform a typecast ... type. See Also: .cast(Class) Since: Jakarta Persistence (JPA) 1 .0 Expression cast ( Class type ... ) 1 .0 Fetch fetch ( SingularAttribute attribute , JoinType jt ) Create a fetch join to the specified

criteria api / embedded objects / where order

. Because we have different complex queries I did not dare to just change the order for the new version 2.8. 1 but to make sure ... Dear Support Team Changing objectdb from version 2.7.4 to version 2.8. 1 I found, that query ... red (Version 2.8. 1 ). For what I thought I realized is, that the version 2.8. 1 was sensitive

Collation and String Order

feature. Many CRMs, DMS and other systems requires correct collation when using order by clause.  + 1 for this ... dmarko David Marko ... 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

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

JPA Query Expressions (JPQL / Criteria)

JPQL and criteria queries are built on query expressions. Every query consists of clauses , such as SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY . Each clause is composed of JPQL or ... operators, listed in order of decreasing precedence: Navigation operator ( . ) Arithmetic operators

JPA Metamodel Attributes

. Represents an attribute typed as a java.util.Set , implying unique elements without a specific order . Represents an attribute typed as a java.util.List , supporting ordered collections and index-based

ObjectDB 2.9 Developer's Guide

A prior knowledge of database programming (SQL, JDBC, ORM or JPA) is not required in order to follow ... . Further Reading and Resources This guide focuses mainly on practical issues in order to make the reader

JPA Relationships Annotations

the ordering and mapping of collection-based relationships using these annotations: Specifies the ordering of elements in a List-valued association at the time of retrieval. Specifies the attribute

ObjectDB Object Database Features

ordering and aggregate calculations . Lazy/Eager Loading Automatic pre-loading optimizations ... ). ORDER BY (including ASC, DESC). Aggregates (COUNT, SUM, AVG, MAX, MIN). Query Expressions Path

JPA Criteria API Queries

BY and HAVING clauses ( groupBy , having , count , sum , avg , min , max , ...) ORDER BY clause ( orderBy , Order , asc , desc ) The links above go to the Criteria query sections within pages

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.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 CollectionTable ForeignKey Since: Jakarta Persistence (JPA) 1 .0 Public Instance Methods CheckConstraint[] check

jakarta.persistence.ConstructorResult

constructor, in order . Since: Jakarta Persistence (JPA) 1 .0 Class targetClass () (Required ... 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

jakarta.persistence.criteria.CriteriaBuilder.SimpleCase

Interface used to build simple case expressions. Case conditions are evaluated in the order in which they are specified. Since: Jakarta Persistence (JPA) 1 .0 Public Instance Methods Selection alias ... : selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression as ( Class type ) Perform

jakarta.persistence.criteria.Path

(JPA) 1 .0 Expression as ( Class type ) Perform a typecast upon the expression, returning a new ... ) Since: Jakarta Persistence (JPA) 1 .0 Expression cast ( Class type ) Cast this expression ... to the referenced attribute. Since: Jakarta Persistence (JPA) 1 .0 Expression get ( PluralAttribute

jakarta.persistence.criteria.CriteriaBuilder.Case

Interface used to build general case expressions. Case conditions are evaluated in the order in which they are specified. Since: Jakarta Persistence (JPA) 1 .0 Public Instance Methods Selection alias ( String ... : selection item. Since: Jakarta Persistence (JPA) 1 .0 Expression as ( Class type ) Perform a typecast

jakarta.persistence.Index

::= column_name [ASC | DESC] If neither ASC nor DESC is not specified, ASC , that is, ascending order ... CollectionTable JoinTable TableGenerator Since: Jakarta Persistence (JPA) 2. 1 Public Instance Methods String columnList () (Required) The columns included in the index, in order , following the BNF rule

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 NamedNativeQuery Since: Jakarta Persistence (JPA) 1 .0 Public Instance Methods String

jakarta.persistence.Column

field. If no Column annotation is explicitly specified, the default values apply. Example 1 : @Column ... public String getDescription() { return description; } Example 3: @Column(name = " ORDER _COST", updatable ... of type numeric or decimal . Since: Jakarta Persistence (JPA) 1 .0 Public Instance Methods

FROM clause (JPQL / Criteria API)

, LOWER, MAX, MEMBER, MIN, MOD, NEW, NOT, NULL, NULLIF, OBJECT, OF, OR, ORDER , OUTER, POSITION, SELECT

JPA Queries

the query clauses. Elements used to define the SELECT and ORDER BY clauses. Elements for the FROM

What is the Java Persistence API (JPA)?

order to interact with a relational database such as Oracle, DB2, SQL Server or MySQL. The popular JPA

DELETE Queries in JPA/JPQL

cannot include multiple variables, JOIN clauses, or the GROUP BY , HAVING , and ORDER BY clauses

What are the main benefits of using ObjectDB?

that ability and require multiple tables, multiple records and join operations in order to support

JPA Criteria Queries

to define SELECT, WHERE , GROUP BY , and ORDER BY clauses. To execute the query, pass the instance

UPDATE SET Queries in JPA/JPQL

. However, they do not support the GROUP BY , HAVING , and ORDER BY clauses. For example, the following

Paths and Types in JPQL and Criteria API

by all six comparison operators and used for ordering . Navigation through path expressions A path

Step 3: Define an EJB Session Bean

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class

Step 3: Define a Spring DAO Component

() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return

Step 3: Add a Main Class

In this step we will add code to the Main class (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. Use copy and paste to replace the content of the Main class with the following content: package tutorial; import javax

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