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";        

java.lang.NullPointerException when using ORDER BY

== 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK ... am not sure if this problem is related to the other as the query works if you remove the order by ... which is used in the order by part, it always has a value. Anyway, we tried fixing the indices

Strange behaviour with ORDER BY and IN

performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as ... if we order by a simple member (e.g. a String) being the Entity-ID and, at the same time, filter ... ("Locations without selection criterion in descending order ( by id): ");      

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 ... ORDER BY clause. However, if you have to sort a large result list - it might be more efficient

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 ... ORDER BY i.getPrice() DESC");         List resultList = query

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

  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

How the sort order (in queries) works for non english letters?

specify they locale as part of the index definition or the ORDER BY clause, so the sort uses ... (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

Pre-detach loading: retrieval by navigation not working in if statement

that can be referenced by ID, and meets a uniform and powerful IElement interface. - The BooleanValue is doing a heap ... to do it this way; but the wrapped boolean value is not the whole story.   webel Dr Darren Kelly By JVM ... -Djava.compiler=NONE webel Dr Darren Kelly OK. It could still be an optimization that is used by the JVM

Update is ignored by ObjectDB

Hi! Sorry for my bad english skills. When I execute fulfilOrder, only Order entity is updated in ... ; @PersistenceContext(unitName = "SMShop") private EntityManager shopdb; ... public Order fulfilOrder(Long orderID, Long userID, int itemID) { Order order = shopdb.find( Order .class, orderID); if ( order == null) { User

Should derived fields of an EmbeddedId be manually maintained by app code?

, of type ECompoundKeyMapItem, identified by their "key" within the EContainer class. The items ... "ECompoundKeyMapSubItem", identified by their keys. The embeddedId for the item class, ECompoundKeyMapItemId ... ] Unexpected exception (Error 990) Generated by Java HotSpot(TM) Client VM 1.6.0_27 (on Windows Server 2008 6.0

Grouping by date()

with this issue. Query: select hour(ov.created), count(ov) from ObjectView ov group by hour(ov.created) order by ... have to group by date(). For few queries I was concatenating 'date' from year()-month()-day() calls ... with new version. When you group by date() there are two days per day. I mean group by divides each day

A lot of ENT and SIV instances which are not cleared by GC

and fixed (in build 2.6.1_01) a bug in cascading detach through mapped by to-many relationships ... the issue in order to explore it further. support Support Thanks, no exception now

jakarta.persistence.OrderColumn

and maintained by the application. The OrderBy annotation is not used when OrderColumn is specified. The order ... : Annotation Target: Method, Field Specifies 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

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.EntityManager

arguments must be specified in the order in which the result sets is returned by the stored procedure ... must be specified in the order in which the result sets is returned by the stored procedure ... via a call to close , to allow resources to be cleaned up by the persistence provider. This approach places

jakarta.persistence.ColumnResult

can be included in the query result by specifying 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

jakarta.persistence.StoredProcedureQuery

parameters for which default values have been defined by the stored procedure. When getResultList ... procedure query, followed by getUpdateCount . The results of executeUpdate ... set can be obtained by calling getResultList or getSingleResult . The hasMoreResults method

jakarta.persistence.NamedNativeQuery

may be executed by calling EntityManager.createNamedQuery . In simple cases, a resultClass specifies ... = "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

jakarta.persistence.NamedStoredProcedureQuery

. The parameters of the stored procedure are specified by the parameters element. Parameters must be specified in the order in which they occur in the parameter list of the stored procedure ... . The resultSetMappings element names one or more result set mappings, as defined by the SqlResultSetMapping annotation

Apache License, Version 2.0, January 2004

the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright ... and all other entities that control, are controlled by , or are under common control with that entity

Privacy Policy

the Service. By using the Service, You agree to the collection and use of information in accordance ... files that are placed on Your computer, mobile device or any other device by a website, containing ... individuals employed by the Company to facilitate the Service, to provide the Service on behalf

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

JPA Persistable Types

are represented in queries by entity names . By default, the entity name is the unqualified name ... can be set explicitly by using the name attribute of the @Entity annotation: @Entity ( name ="MyName ... is declared as embeddable by marking it with the @Embeddable annotation: @Embeddable public class Address

Retrieving JPA Entities

the no-argument constructors of entity classes and keep them as simple as possible. Retrieval by class and primary key Every entity can be uniquely identified and retrieved by the combination of its class ... is similar to the find method, but if the entity is not already managed by the EntityManager

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 " + "WHERE o.cid = c.id " + "GROUP BY c.id, c.name", "CustomerDetailsResult"); @SqlResultSetMapping( name

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 ... Persistence (JPA) 1.0 String referencedColumnName (Optional) The name of the column referenced by

Database Management Settings

for each new database file. The resize attribute specifies the size by which to extend the database ... can improve performance by reducing file fragmentation that can result from frequent resize operations ... environments. By default, the recovery file is created in the same directory as the database file

JPA Optimistic and Pessimistic Locking

. When you use ObjectDB, optimistic locking is enabled by default and is fully automatic. Optimistic ... ;is modified, its version number is automatically incremented by one. Version numbers are managed internally but can be exposed by defining a version field . During commit (and flush ), ObjectDB checks

JPA Class Enhancer

The ObjectDB Enhancer is a post-compilation tool that improves performance by modifying ... directly accessing persistent fields of other classes. This practice is required by the JPA specification but not enforced by ObjectDB. Instead, use the accessor and mutator methods of the desired class

jakarta.persistence.Column

: Annotation Target: Method, Field Specifies the column mapped by the annotated persistent property or ... public String getDescription() { return description; } Example 3: @Column(name = " ORDER _COST", updatable ... entailed by the primary key mapping and to constraints specified at the table level. Default: false

jakarta.persistence.Index

is given by the following simple BNF: column_list ::= index_column [, index_column]* index_column ::= 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.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

JPA ORM Mapping Annotations

a column that is used to maintain the persistent order of a list. Inheritance mapping Define

Removed entities can be found by query in the same transaction

Hello, we opened a transaction, load an entity from database and removed this entity by em.remove(). Afterwards the entity can be load again by query although the resulted entity have an attribute ... explanation on the change in build 2.7.4_04: ObjectDB uses snapshots in order to isolate transactions, i.e

Storing JPA Entities

Using Jakarta Persistence (JPA) You can store new entities in the database either explicitly by ... . The exception is thrown either by persist , if the existing entity is currently managed by the EntityManager , or by commit . Referenced embedded objects The following code stores an Employee instance

JPA Shared (L2) Entity Cache

a second-level (L2) cache of entities, which is managed by the EntityManagerFactory and shared by ... and are shared by all EntityManagerFactory and EntityManager instances for that database ... value. Persistence Unit Settings You can also enable or disable the shared cache by using a persistence

Lazy loading of mapped by (inverse) singular references

ObjectDB ignores lazy setting of non collection mapped by (inverse) fields and loads them always eagerly. This is allowed by JPA since lazy is only hint but it is not efficient. The reason ... immediately, at least as hollow objects. In order to instantiate referenced objects their exact type

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

: If the type of the criteria query is CriteriaQuery (i.e., a criteria query object created by either the createTupleQuery method or by passing a Tuple class argument to the createQuery method), a Tuple object corresponding to the arguments of the multiselect method, in the specified order

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

by either the createTupleQuery method or by passing a Tuple class argument to the createQuery method ... the specified order , will be instantiated and returned for each row that results from the query ... ., a criteria query object created by passing a X class argument to the createQuery method), the elements

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.AssociationOverride

defined by the mapped superclass. If not specified, the association is mapped the same as in the original mapping. When used to override a mapping defined by a mapped superclass, AssociationOverride ... . When used to override a relationship mapping defined by an embeddable class (including an embeddable class

Managing JPA Entities

when it is persisted to the database by using an EntityManager 's persist method, which must be invoked ... about making changes to entities. A managed entity can be marked for deletion by using ... is retrieval by refresh , which always requires database access. The main role of the persistence context

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

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

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