ObjectDB Database Search

51-100 of 200 results

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

Retrieving JPA Entity Objects

of entity classes and to keep them as simple as possible. Retrieval by Class and Primary Key Every entity object can be uniquely identified and retrieved by the combination of its class and its primary key ... method except that if the entity object is not already managed by the EntityManager a hollow object

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 ... superclasses are treated by ObjectDB as ordinary entity classes. Mapped superclasses are really

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

Storing JPA Entity Objects

New entity objects can be stored in the database either explicitly by invoking the persist method ... is committed. An IllegalArgumentException is thrown by persist if the argument is not an instance of an entity ... is thrown. The exception is thrown either by persist (if that existing entity object is currently

Detached Entity Objects

Detached entity objects are objects in a special state in which they are not managed by any ... ). Retrieval by navigation from detached objects is not supported, so only persistent fields ... EntityManager . In addition, in JPA 2 we can detach an entity object by using the detach method: em. detach

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 Reference (JavaDoc)

of these documentation pages is to serve as a reference. In order to learn how to use JPA and ObjectDB please read the ObjectDB manual .

Database Connection using JPA

A connection to a database is represented by an EntityManager instance, which also provides ... . An EntityManagerFactory is constructed for a specific database, and by managing resources efficiently (e.g ... the content of a database require active transactions. Transactions are managed by an EntityTransaction

Comparison in JPQL and Criteria API

its own notation (which is also in use by JDOQL, the JDO Query Language). ObjectDB supports both forms ... by these operators. Comparing NULL values The following table shows how NULL values are handled by ... IS NULL and IS NOT NULL operators which are provided by JPQL (and SQL): c.president IS NULL c.president

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

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

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

Working with JPA Entity Objects

are provided in the Storing Entities section. Entity objects retrieved from the database by ... is detected by the owning EntityManager and the update is propagated to the database on transaction ... (except retrieval by refresh , which always requires accessing the database). The main role of the persistence

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

SELECT clause (JPQL / Criteria API)

, the following query returns Country objects that become managed by the EntityManager em : TypedQuery query ... in the results directly, but their content can be added to the SELECT clause by using a bound JOIN ... that are retrieved directly by a result path expression are not associated with an EntityManager and changes

Literals in JPQL and Criteria Queries

literals (e.g. 077 , 077L ), a feature that is not currently supported by all JPA implementations. String ... single quotes (e.g. 'Adam' , '' ) and a single quote character in a string is represented by ... can be used (e.g. "Adam\'s" , "abcd\n1234" ) but this is not supported by all the JPA implementations

ObjectDB Website - Terms and Conditions of Use

1. Terms By accessing and using this web site, you agree to be bound by these web site Terms ... from using or accessing this site. The materials contained in this web site are protected by ... of these restrictions and may be terminated by ObjectDB Software at any time. Upon terminating your viewing

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