Internal Website Search

101-150 of 200 results

composite index not used in query

and a.startDate ?1)) the composite index is not used, query plan:  Step 1: Process Action (a) instances ------------------------------------ [ Step 1a] Scan index com.agile.hummingbird.Action[startDate] locating all the Action (a) instances. [ Step 1b] Filter the results of step 1a retaining

Performance issue in a query due to compareTo calls

WHERE v. step .stepNumber = ? is very slow in comparing to the query: SELECT v FROM Values v WHERE v ... = CascadeType.REMOVE) private Values valuesRef; }   @Index (members = {" step .stepNumber"}) @Entity ... ; @OneToOne (fetch = FetchType.EAGER) private TCStep step ; //For performance reasons, we use a list

no query result

============================ [ Step 1] Scan index com.agile.hummingbird.Action[endDate] locating all the Action (a) instances. [ Step 2] Retrieve fields in Action (a) instances. [ Step 3] Filter the results of step 2 retaining only results that satisfy: (a.transferred=0). [ Step 4] Filter the results of step

Slow searching with two indexes

where receiver == :r order by id desc Query Plan Description ====================== [ Step 1] Scan index com ... : (this.receiver==:r). [ Step 2] Order the results of step 1 by : desc(any(any(this.id))). [ Step 3] Apply ... NmeaBatch where receiver == :r order by id desc Query Plan Description ====================== [ Step 1

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

FROM clause (JPQL / Criteria API)

at the WHERE clause level by using a type expression . For example, in the following query, c iterates ... , and the same query can also be written as follows: SELECT c FROM Country c By default, the name ... name). The default name can be overridden by specifying another name explicitly in the @Entity 's

Shared (L2) Entity Cache

an entity object that is already managed by the  EntityManager returns the existing instance from ... objects, which is managed by the EntityManagerFactory and shared by all its EntityManager objects ... . The scope of these server side caches is wider, since they exist per database and are shared by

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

ObjectDB Object Database Features

Databases are also supported by ObjectDB. The combination of Object Database features ... (limited only by operating system resources). Unlimited CPUs and cores. Reliability and Stability Recovery from failure by using a  recovery file and double writing. Additional recovery layer

JPA Lifecycle Events

and are invoked automatically by JPA when these events occur. Internal Callback Methods Internal callback ... - after an entity has been retrieved from the database. @PreUpdate - when an entity is identified as modified by ... for the same event. However, the same method may be used for multiple callback events by marking

JPA Queries

Queries are represented in JPA  by the Query and TypedQuery interfaces: The JPA Query API ... that is known only at runtime (e.g. depending on which fields are filled by a user in a form) can be done by concatenating JPQL strings into a valid complete JPQL query. JPA 2 introduced the JPA Criteria

Criteria Query Selection and Results

The JPA Criteria API interfaces in this group are used for setting the SELECT and ORDER BY clauses ... clause in a criteria query is represented by Selection : Because Selection  is a super interface ... selection expressions can be represented by   CompoundSelection , which is itself a subinterface

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

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

DELETE Queries in JPA/JPQL

As explained in chapter 2 , entity objects can be deleted from the database by ... ;within an active transaction, either explicitly  by calling the  remove method or implicitly  by a cascading operation. Applying changes to the database by calling the commit method. JPQL

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

UPDATE SET Queries in JPA/JPQL

Existing entity objects can be updated, as explained in chapter 2 , by : Retrieving ... ;within an active transaction. Applying changes to the database by calling the commit method. JPQL UPDATE queries ... that a cached entity object in its persistence context has been modified by an UPDATE query

JPA Criteria API Queries

, are defined by the instantiation of Java objects that represent query elements. A major advantage ... factory of criteria queries and criteria query elements. It can be obtained either by the EntityManagerFactory 's getCriteriaBuilder method or by the  EntityManager 's getCriteriaBuilder method

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

JPA Persistence Unit

is optional when using ObjectDB, but required by JPA. persistence.xml Persistence units are defined in ... A persistence unit is defined by a persistence-unit XML element. The required name attribute ( “my-pu ... should be used. ObjectDB is represented by the com.objectdb.jpa.Provider string. If not specified, the first JPA

JPA Exceptions

JPA exceptions are represented by a hierarchy of unchecked exceptions: java.lang.Object java.lang ... are represented directly by the PersistenceException class. Some specific errors are represented by ... transaction is represented by : Database update failures that require transaction rollback are represented by

Database Transaction Replayer

. Recording is enabled by default and can be disabled in the configuration . The ObjectDB Replayer tool ... is useful for two different purposes: It enables recovery from a database failure by replaying the recorded operations. It enables reproducing problems during debugging by repeating a failure. Backup

Setting and Tuning of JPA Queries

in Query and TypedQuery support method chaining ( by returning the query object ... to be visible to the query. Flush policy in JPA is represented by the FlushModeType enum, which has two values ... the default is COMMIT (which is more efficient). The default mode can be changed by the application

JPA Query Structure (JPQL / Criteria)

;of up to 6 clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The first two clauses, SELECT and FROM are required in every retrieval query (update and delete queries have a slightly different form). The other JPQL clauses, WHERE , GROUP BY

JPA Metamodel API

Metamodel API is Metamodel . It can be obtained either by the EntityManagerFactory 's getMetamodel method or by the EntityManager 's getMetamodel method (both methods are equivalent). For example, given an EntityManager , em , a Metamodel instance can be obtained by : Metamodel metamodel = em

Criteria Query From Elements

variables are represented in criteria queries by descendant interfaces of the From interface: Range variables (bound by an entity class) are represented by the Root subinterface: Join variables (bound by an attribute of a preceding variable in the FROM clause) are represented by the Join subinterface

Database Server

, if an ObjectDB database is accessed directly only by a web application, it should be embedded in ... configuration is loaded automatically as explained in chapter 6 . This can be overridden by specifying ... Configuration , but can be overridden by an explicit command line option: java com.objectdb.Server

Database Doctor

of a corrupted ObjectDB database file Repairs a corrupted ObjectDB database file by creating a new ... - if the recovery file is disabled. Using the database file simultaneously by two instances ... . Modifying the database file externally not through ObjectDB (e.g. by malicious software such as

Entity Management Settings

are handled. ObjectDB can manage non enhanced classes by using reflection at the cost of performance ... entities are always held by strong references in the persistence context (until commit or flush ... that is managed by the EntityManagerFactory and shared by all its EntityManager instances. The level 2 cache

Online Backup

An ObjectDB database can be backed up by simply copying or archiving the database file while the database is offline (i.e. when it is not open in an ObjectDB server and not in use by any application ... . Starting Online Backup The online backup can be started by executing a special query on an EntityManager

General Settings and Logging

a limit size that is specified by the threshold attribute. The mb and kb suffixes represent megabytes ... has to be specified for ObjectDB to avoid using sockets that are expired by the firewall. The element    ObjectDB manages a list of the recently accessed database URLs for use by the Explorer

2.9.x query issue with @Unique constraint

: (u.userName=:userName). [ Step 2] Order the results of step 1 by : u. [ Step 3] Use NULL as a result ... for :userName parameter 2.8.9 Query plan description ============================ [ Step 1] Scan type User locating all the User (u) instances. [ Step 2] Evaluate fields in User (u) instances. [ Step 3

Best practise loading big data

. Creating and traversing. For the traversing we access the data block by block - in each block step by step and in each step value by value. When do this within one transaction without holding ... s : sb. steps ) { MyValue v : s.values. get ( 0 ); } } The values are not referenced by

Server Configuration

is affected also by other elements in the configuration file, particularly the and the configuration elements ... . If another port is specified it also has to be specified by clients in the URL connection string ... specifies the maximum number of simultaneous connections that are accepted by the server. A request

Database Replication and Clustering

ObjectDB server can manage different types of databases, including master databases, slave database ( by ... The configuration above demonstrates a situation in which the master database is managed by a server on localhost:6000 and the slave database is managed  by a server on localhost:6001 . In this case

Logical Operators in JPQL and Criteria API

|| NOT ! JPQL follows the SQL notation, while Java uses its own notation (which is also in use by JDOQL ... expressions are represented in criteria queries by Expression and descendant interfaces. For example, a boolean path (a field or a property) is represented by Path : Path isInUN = country

Index Definition

Querying without indexes requires iteration over entity objects in the database one by ... on more than one persistent field. It is defined by specifying multiple fields in the members attribute ... a collection, so multiple values will be maintained by the index for every entity. Multi part paths in

Numbers in JPQL and Criteria Queries

The following arithmetic operators are supported by JPA: 2 unary operators:   + (plus) and - (minus). 4 ... of the same type. The MOD Function The MOD function calculates the remainder of the division of one number by another, similar to the modulo operator ( % ) in Java (which is also supported by ObjectDB as

JPA Named Queries

named queries instead of dynamic queries may improve code organization by separating the JPQL ... carefully to avoid collision (e.g. by using the unique entity name as a prefix). It makes sense to add ... at Runtime Named queries are represented at runtime by the same Query and TypedQuery interfaces

JPA Query API

Queries are represented in JPA 2 by two interfaces - the old Query interface ... with an EntityManager (represented by em in the following code snippets), which serves as a factory ... which retrieves all the Country objects in the database is represented by both q1 and q2 . When building

Deleting JPA Entity Objects

Existing entity objects can be deleted from the database either explicitly by invoking the remove ... committed the object is not deleted. An IllegalArgumentException is thrown by remove if the argument ... should be cascaded automatically to entity objects that are referenced by that field (multiple entity objects

Chapter 6 - Configuration

: This page explains how ObjectDB configuration works in general. The Configuration Path By default ... explicitly by setting the "objectdb.home" system property: System.setProperty("objectdb.home", "/odb ... : java "-Dobjectdb.home=/odb" ... The Configuration File As noted above, by default the configuration

Updating JPA Entity Objects

by fields that are marked with CascadeType . PERSIST or CascadeType . ALL are also persisted ... yet are also persisted. Automatic Change Tracking As shown above, an update is achieved by modifying a managed ... demonstrated above, array changes are not detected automatically ( by default) but it is possible

SSL Configuration

"false" ) specifies if SSL is used. As shown above, SSL is disabled by default. It could be enabled ... signature. This file is generated from the Keystore file by omitting the private key ... ;the client machine by the server is also required a Keystore file (which might be different from

Issue with UPPER ?

====================== Step 1: Process Mitglied ($1) instances --------------------------------------- [ Step 1a] Scan ... ) instances. [ Step 1b] Evaluate fields in Mitglied ($1) instances. Step 2: Process IndividualProfile ($3) instances   (for every result of step 1

Schema Update

, other schema changes are handled by ObjectDB automatically. Note: Extreme caution is required ... is changed from the original name, which is specified by the required name attribute, to the new name ... attribute is specified the class name is changed from the original name, which is specified by

Is ObjectDB better than competing object databases?

of the Java Data Objects (JDO) API than competing object databases. By using a standard API such as JPA ... relational database by using an ORM JPA provider such as Hibernate, EclipseLink or Open JPA ... . The support of two standard APIs (JPA and JDO) by ObjectDB minimizes the risk

[ODB1] Chapter 1 - About ObjectDB

Compliant ObjectDB is compliant with the JDO (Java Data Objects) standard, developed by Sun ... DB2 and Microsoft SQL Server. In addition, by using JDO you are backed up by a large community ... move your application to other platforms (Windows, Unix, Macintosh and almost any other platform), simply by taking

ObjectDB 1.0 Manual

technology by Sun Microsystems. The main purpose of this guide is to familiarise you with ObjectDB ... class is and which types are supported by JDO. Chapter 4 - JDO Metadata Shows how to define JDO ... you may want to extend your knowledge of JDO by reading the JDO specification or a book on JDO