ObjectDB Database 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 ... Location("2", "B"), new Location(" 3 ", "C")   ... ; + " order by s_location.id asc";   | |
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 | |
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 ... $200(EventQueue.java:103) at java.awt.EventQueue$ 3 .run | |
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 | |
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 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 ... .34" "org.hibernate" % "hibernate-entitymanager" % "4. 3 .8.Final" enigma969 Christian Gruber | |
A few entities loss after update to 2.3.7_08! The old database is created by 2. 3 .6. And recreate the database by doctor is useless. But the other version such as 2. 3 .7 works fine. So we believe 2. 3 .7_08 has a bug. codefad FrankChu More details are required in order to understand the problem. support Support | |
jakarta.persistence.criteria.SetJoin. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Expression value ) Create a predicate to test ... to be tested against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 ... testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Fetch fetch ( SingularAttribute attribute | |
jakarta.persistence.criteria.CollectionJoin of the given basic type. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Expression value ) Create ... . Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Object value ) Create a predicate to test ... against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Fetch fetch | |
jakarta.persistence.criteria.From) 3 .2 Predicate equalTo ( Expression value ) Create a predicate to test whether the expression ... against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ... . Since: Jakarta Persistence (JPA) 3 .2 Fetch fetch ( SingularAttribute attribute ) Create a fetch join | |
jakarta.persistence.criteria.Join of the given basic type. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Expression value ) Create ... . Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Object value ) Create a predicate to test ... to be tested against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Fetch fetch | |
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 ... : "" Since: Jakarta Persistence (JPA) 3 .2 String table (Optional) The name of the table that contains | |
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 | |
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 | |
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 | |
JPA Primary Key ordered by their primary key. Sometimes, it is useful to choose a primary key that helps cluster ... id; : } @Embeddable public class EventId { int sensorId; Date time; } Because entities are ordered | |
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.Path expression of the given basic type. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ... for equality. Since: Jakarta Persistence (JPA) 3 .2 Predicate equalTo ( Object value ) Create a predicate ... ) 3 .2 Path get ( SingularAttribute attribute ) Create a path corresponding to the referenced single | |
jakarta.persistence.criteria.CriteriaBuilder.Case Interface used to build general case expressions. Case conditions are evaluated in the order in ... Persistence (JPA) 3 .2 Predicate equalTo ( Expression value ) Create a predicate to test ... against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Predicate | |
jakarta.persistence.criteria.CriteriaBuilder.SimpleCase Interface used to build simple case expressions. Case conditions are evaluated in the order in ... Persistence (JPA) 3 .2 Predicate equalTo ( Expression value ) Create a predicate to test ... to be tested against Returns: predicate testing for equality. Since: Jakarta Persistence (JPA) 3 .2 Predicate | |
jakarta.persistence.Column public String getDescription() { return description; } Example 3 : @Column(name = " ORDER _COST", updatable ... , and is not portable across databases. Default: "" Since: Jakarta Persistence (JPA) 3 .2 String table ... driver should be stored in a timestamp column. Default: -1 Since: Jakarta Persistence (JPA) 3 .2 | |
Strings in JPQL and Criteria Queries('India', 'a') is evaluated to 5 . LOCATE('Japan', 'a', 3 ) is evaluated to 4 . LOCATE('Mexico ... [, length]) function returns a portion of a string. For example: SUBSTRING('Italy', 3 ) is evaluated to 'aly' . SUBSTRING('Italy', 3 , 2) is evaluated to 'al' . Positions are one-based (as in SQL), not | |
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 ... : "" Since: Jakarta Persistence (JPA) 3 .2 Additional JDK methods inherited from java.lang.annotation | |
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 ... by the SQL query. Default: LockModeType.OPTIMISTIC Since: Jakarta Persistence (JPA) 3 .2 FieldResult | |
jakarta.persistence.criteria.CriteriaBuilder.asc(Expression,Nulls) nullPrecedence - the precedence of null values Returns: ascending ordering corresponding to the expression. Since: Jakarta Persistence (JPA) 3 .2 ... Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc ( Expression expression , Nulls nullPrecedence ) Create an ordering by | |
jakarta.persistence.criteria.CriteriaBuilder.desc(Expression,Nulls) nullPrecedence - the precedence of null values Returns: descending ordering corresponding to the expression. Since: Jakarta Persistence (JPA) 3 .2 ... Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc ( Expression expression , Nulls nullPrecedence ) Create an ordering by | |
Literals in JPQL and Criteria Queries, -127L, 0L, 07777L float : 3 .14F, 0f, 1e2f, -2.f, 5.04e+17f double : 3 .14, 0d, 1e2D, -2., 5.04e+17 ... . literal (1); Expression i2 = cb. literal (Integer.ValueOf(2)); Expression d = cb. literal ( 3 .4 | |
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 | |
Query Parameters in JPA for all its parameters. The order in which you set the parameters does not matter. Ordinal | |
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 | |
JPA ORM Mapping Annotations a column that is used to maintain the persistent order of a list. Inheritance mapping Define | |
GROUP BY and HAVING clauses The GROUP BY clause groups query results. A JPQL query with a GROUP BY clause returns properties of the resulting groups instead of individual objects and fields. In the query execution order , the GROUP BY clause is processed after the FROM and WHERE clauses but before the SELECT clause | |
Chapter 4 - JPA Queries (JPQL / Criteria) clauses: SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY : The next section explains | |
jakarta.persistence.AttributeOverride order to specify it as part of the map key or map value. To override mappings at multiple levels ... protected Address address; ... } Example 3 : @Entity public class PropertyRecord { @EmbeddedId protected | |
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 | |
Numbers in JPQL and Criteria Queries. For example: MOD(11, 3 ) evaluates to 2 . MOD(8, 4) evaluates to 0 . The MOD function takes two integer ... function returns the square root of a specified argument. For example: SQRT(9) is evaluated to 3 SQRT(2 | |
JPA Class Enhancer explained in Chapter 3 ). Special code is added to enhanced classes that automatically notifies ObjectDB ... lists the classes that have been enhanced: [ObjectDB 2.9.4] 3 persistable types have been enhanced | |
Eclipse/JPA Java EE Tutorial for Java EE Developers. GlassFish Server 3 .0.1 (or above). The last version of ObjectDB (just download and extract). The tutorial was written for Eclipse 3 .6.1 but it should work with other Eclipse versions ... : ObjectDB 2. 3 .7_04 or later is required if Glassfish 3 .1.2 (or later) is used. The Tutorial Steps This tutorial consists of the following steps: | |
Step 1: Create a Maven Web Project.springframework spring-webmvc 3 .0.5.RELEASE org.springframework spring-tx 3 .0.5.RELEASE org.springframework spring-orm 3 .0.5.RELEASE aopalliance aopalliance 1.0 cglib cglib 2.2 org.aspectj aspectjweaver | |
Step 1: Create a Maven Web Project org.springframework spring-webmvc 3 .0.5.RELEASE org.springframework spring-tx 3 .0.5.RELEASE org.springframework spring-orm 3 .0.5.RELEASE | |
Step 1: Create a Java EE 6 Web Project a Project Name (e.g. Guestbook ). Select GlassFish Server Open Source Edition 3 (Java EE 6) as the Target runtime. Note: You may have to add GlassFish 3 as a new server by clicking the New Runtime... button ... to GlassFish 3 (which has to be downloaded separately) . Click the Finish button to create the Java EE 6 | |
Report Generation with BIRT and JPA This tutorial demonstrates how to create reports based on data in an ObjectDB database using the popular open source Business Intelligence and Reporting Tools (BIRT). In order to keep things as simple as possible - we will use the basic points.odb ObjectDB database file from the Getting |