ObjectDB Database Search

101-150 of 200 results

2.7.3_03 Erroneous "Attempt to modify a primary key of a managed object"

ObjectDB 2 .7.3_03 gives my application a "com.objectdb.o.UserException: Attempt to modify a primary key of a managed object ", but my application is not trying to change the primary key.  (ObjectDB log file attached.) If I revert to ObjectDB 2 .7.3, then no more exception.  (No other code

OutofMemory error with Object DB 2.0

Hi, I am getting the below OutOfMemoryError after I have migrated from objectdb 1.0 to 2 .0 The application works fine with only 256MB heap size with objectdb 1.0  But on 2 .0 even with max heap ... is commited after persisting 200 records and then the same transaction object from the same

UserException - Object User#2 belongs to another EntityManager

._PersistenceException: Object 'com.pingushare.entity.p1.User# 2 ' belongs to another EntityManager at com ... Hi! Scenario's steps: 1. User goes to his profile, a JSF page. 2 . @RequestScoped CDI bean ... CDI. Problem on method execution, which runs a NamedQuery: com.objectdb.o.UserException - Object 'com

ObjectDB 2.6.9_06 (embedded): Cascading merge resulting in duplicate objects

a NaturalPerson entity from the database, then add a new address to the object's "addresses" list and use EntityManager.merge( object ) to persist it along with the new address, the database contains two new ... #... is 2 less than that of the entity related to the person's address list). If I use "EntityManager

Comparison in JPQL and Criteria API

/SQL Set 2 : Java/JDO Less Than Less Than or Equal To = Equal To = == Not Equal To != The main ... rather than object identity. Data and Time values: Any comparison operator can be used ... rather than object identity. boolean and Boolean values: Can be compared using the equality operators

Database Explorer

the approach of traditional visual database tools. Each row represents an object , each column represents a persistent field, and each cell contains the value of a field for a specific object . This type of viewer is useful for viewing data in a simple object model. In most cases, the Tree window

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 ... object and returns a literal expression. For example: // Boolean literals: Expression t = cb ... . literal (1); Expression i2 = cb. literal (Integer.ValueOf( 2 )); Expression d = cb. literal (3.4

FROM clause (JPQL / Criteria API)

The FROM clause declares query identification variables for iterating over objects in the database ... because both are used to iterate over objects . Range variables Range variables are query identification variables that iterate over all the database objects of a specific entity class hierarchy, which includes

JPA Persistable Types

can be stored in the database only as embedded objects , that is, as part of a containing entity. A class ... in the debugger view and when invoking the getClass method on an object of a proxy class. Enum Types ... are stored as ordinal numbers (0, 1, and 2 ), while values of the color3 field are stored as strings

JPA Extended API Reference Guide

Jakarta Persistence API (JPA) 3. 2 documentation, generated from the official JavaDoc and enriched ... for representing the persistent object model. Use these interfaces to inspect entity structures ... configuration options for common JPA operations. Details the annotations used to define the persistent object

SELECT clause (JPQL / Criteria API)

query returns Country objects , which then become managed by the EntityManager instance em : TypedQuery ... , including transparent navigation to other database objects , transparent update detection , support ... , the following query returns country names as String instances, rather than Country objects : SELECT

jakarta.persistence.criteria.ListJoin

boolean expression Returns: the modified join object . Since: Jakarta Persistence (JPA) 2 .1 ListJoin ... that has been specified as a java.util.List . Since: Jakarta Persistence (JPA) 2 .0 Public Instance Methods Selection ... a typecast upon the expression, returning a new expression object . Unlike Expression.cast

jakarta.persistence.criteria.Join

. Since: Jakarta Persistence (JPA) 3. 2 Predicate equalTo ( Object value ) Create a predicate to test ... . Since: Jakarta Persistence (JPA) 3. 2 Predicate notEqualTo ( Object value ) Create a predicate to test ... object . Since: Jakarta Persistence (JPA) 2 .1 Expression type () Create an expression corresponding

jakarta.persistence.criteria.Subquery

for equality. Since: Jakarta Persistence (JPA) 3. 2 Predicate equalTo ( Object value ) Create ... . A subquery has an expression as its selection item. Since: Jakarta Persistence (JPA) 2 .0 Public ... as ( Class type ) Perform a typecast upon the expression, returning a new expression object . Unlike

jakarta.persistence.criteria.PluralJoin

for inequality. Since: Jakarta Persistence (JPA) 3. 2 Predicate notEqualTo ( Object value ) Create ... : the modified join object . Since: Jakarta Persistence (JPA) 2 .1 Join on ( Predicate... restrictions ... query construction. Since: Jakarta Persistence (JPA) 2 .0 Public Instance Methods Selection alias

jakarta.persistence.criteria.MapJoin

for inequality. Since: Jakarta Persistence (JPA) 3. 2 Predicate notEqualTo ( Object value ) Create ... : the modified join object . Since: Jakarta Persistence (JPA) 2 .1 MapJoin on ( Predicate ... collection that has been specified as a java.util.Map . Since: Jakarta Persistence (JPA) 2 .0 Public

jakarta.persistence.criteria.SetJoin

(JPA) 3. 2 Predicate notEqualTo ( Object value ) Create a predicate to test whether the expression ... Returns: the modified join object . Since: Jakarta Persistence (JPA) 2 .1 Expression type () Create ... that has been specified as a java.util.Set . Since: Jakarta Persistence (JPA) 2 .0 Public Instance Methods Selection

jakarta.persistence.criteria.CollectionJoin

. Since: Jakarta Persistence (JPA) 3. 2 Predicate equalTo ( Object value ) Create a predicate to test ... testing for inequality. Since: Jakarta Persistence (JPA) 3. 2 Predicate notEqualTo ( Object value ) Create ... expression Returns: the modified join object . Since: Jakarta Persistence (JPA) 2 .1 CollectionJoin

Running JPA Queries

when exactly one result object is expected. Query.getResultList () : Use in any other case ... when exactly one result object is expected. TypedQuery.getResultList () : Use in any other case. In ... ()) The following query retrieves all the Country objects in the database. Use the getResultList() method

GROUP BY and HAVING clauses

of the resulting groups instead of individual objects and fields. In the query execution order ... . When a query includes a GROUP BY clause, the database objects (or tuples) that result from the FROM clause ... over all Country objects in the database. The GROUP BY clause groups these Country objects by the first

jakarta.persistence.LockModeType

Jakarta Persistence (JPA) Enum jakarta.persistence.LockModeType java.lang. Object ∟ java.lang.Enum ... .OPTIMISTIC on a versioned object , the entity manager must ensure that neither of the following ... of type LockModeType.OPTIMISTIC_FORCE_INCREMENT on a versioned object , will also force an update

jakarta.persistence.PersistenceUnitUtil

cannot be loaded from the database. Since: Jakarta Persistence (JPA) 3. 2 Object getIdentifier ( Object ... is found not to be an entity. Since: Jakarta Persistence (JPA) 3. 2 boolean isInstance ( Object entity ... . Since: Jakarta Persistence (JPA) 3. 2 boolean isLoaded ( Object entity , String attributeName ) Determine

JPA Criteria Queries

queries: Criteria Queries Hierarchy in Jakarta Persistence (JPA) 3. 2   Instances of  ... of CriteriaBuilder  as mutable empty objects , and then defined using setter methods. All query types (SELECT

UPDATE SET Queries in JPA/JPQL

You can update existing entities, as explained in chapter 2 , by following these steps: Retrieve the entities into an EntityManager . Update the relevant entity fields within an active transaction ... . On success, the executeUpdate() method returns the number of objects that the query modified. Selective

JPA Persistence Unit

(PersistenceConfiguration) Starting with  JPA 3. 2 , it is no longer mandatory to use a  persistence.xml   ... the configuration object : EntityManagerFactory emf = Persistence.createEntityManagerFactory(config); Using 

JPA Criteria FROM and JOIN

is structured as follows: Criteria Query From Components in Jakarta Persistence (JPA) 3. 2   ... . FetchParent serves as the base for objects that can initiate these fetch operations, such as From

jakarta.persistence.EntityManagerFactory

Persistence (JPA) 3. 2 T unwrap ( Class cls ) Return an object of the specified type to allow access ... graph entityGraph - entity graph Since: Jakarta Persistence (JPA) 2 .1 void addNamedQuery ( String ... such that future query objects can be created from it using the EntityManager.createNamedQuery or

jakarta.persistence.criteria.From

to the type. Since: Jakarta Persistence (JPA) 2 .0 Public Instance Methods Selection alias ( String name ... upon the expression, returning a new expression object . Unlike Expression.cast , this method does not cause type ... ) Cast this expression to the specified type, returning a new expression object . Unlike Expression.as

Storing JPA Entities

. getTransaction (). commit (); The Employee instance is constructed as an ordinary Java object , and its initial state is New. An explicit call to persist associates the object with an owner EntityManager , em ... class instance. Only entity class instances can be stored in the database independently. Objects

Detached JPA Entities

Detached entities are objects in a special state where they are not managed by an EntityManager but still represent objects in the database. Compared to managed entities, detached objects have limited functionality: Many JPA methods, for example, lock , do not accept detached objects . Retrieval by

JPA Optimistic and Pessimistic Locking

at transaction commit. ObjectDB checks any database object that is being updated or deleted. An exception is thrown if the check finds that another transaction has already updated the object ... objects are locked during the transaction, and any lock conflicts are detected immediately

jakarta.persistence.criteria.Root

. Since: Jakarta Persistence (JPA) 3. 2 Predicate equalTo ( Object value ) Create a predicate to test ... Persistence (JPA) 2 .0 The FROM clause (JPQL / Criteria API) article explains how to use Root ... Expression as ( Class type ) Perform a typecast upon the expression, returning a new expression object

Paths and Types in JPQL and Criteria API

as arguments. Path expressions that navigate from one object to another. Instances of user-defined ... fields to other objects and values. For example, in the expression c.capital , c represents a Country ... identification variable iterates over all the Country objects in the database. For a country with no capital

each 1-2 days objects on some objectdb level lock/block each other

. The objects that are added to the heap are related to: (1) the L2 cache, ( 2 ) the query caches ... each 1- 2 days we have the situation that our system changes to a completely underperforming mode ... select queries without any object manipulation in these threads hgzwicker Hans-Georg Zwicker

Cannot insert more than about 2^20 objects

Hi I have a DB with 4 entities and a total of 4 index. Once I reach 1048565 total objects in the whole DB, i am unable to insert more object , although i get NO error message nor exceptions. Doctor said Db is fine (see below) I notice that 1048565 objects + 4 entities + 4 ID indexes + 4

jakarta.persistence.Persistence

Jakarta Persistence (JPA) Class jakarta.persistence.Persistence java.lang. Object ∟ jakarta ... ) 3. 2 void generateSchema ( String persistenceUnitName , Map map ) Create database schemas and/or ... Persistence (JPA) 2 .1 PersistenceUtil getPersistenceUtil () Return the PersistenceUtil instance Returns

jakarta.persistence.LockTimeoutException

Jakarta Persistence (JPA) Class jakarta.persistence.LockTimeoutException java.lang. Object ∟ java ... (JPA) 2 .0 Public Constructors LockTimeoutException () Constructs a new LockTimeoutException ... ) 1.0 LockTimeoutException ( Object entity ) Constructs a new LockTimeoutException exception

Deleting JPA Entities

is committed. Any embedded objects that the entity contains are also deleted. If the transaction is rolled back, the object is not deleted. The remove method throws an IllegalArgumentException ... that the Address object references. Orphan removal JPA supports a more aggressive cascading removal mode

jakarta.persistence.criteria.CriteriaQuery

. Since: Jakarta Persistence (JPA) 2 .0 The JPA Criteria API Queries article explains how to use ... is Tuple . Otherwise, the result type is Object . Inherited from AbstractQuery Returns: result type ... ) 3. 2 boolean isDistinct () Return whether duplicate query results must be eliminated or retained

jakarta.persistence.PessimisticLockException

Jakarta Persistence (JPA) Class jakarta.persistence.PessimisticLockException java.lang. Object ... , is marked for rollback. Since: Jakarta Persistence (JPA) 2 .0 Public Constructors ... PessimisticLockException ( Object entity ) Constructs a new PessimisticLockException exception with the specified

JPA Lifecycle Events

( Object o) {} @PostPersist void onPostPersist( Object o) {} @PostLoad void onPostLoad( Object o) {} @PreUpdate void onPreUpdate( Object o) {} @PostUpdate void onPostUpdate( Object o) {} @PreRemove void onPreRemove( Object o) {} @PostRemove void onPostRemove( Object o) {} } External callback methods

JPA Query Structure (JPQL / Criteria)

operates on Java classes and objects . For example, a JPQL query can retrieve entities, unlike SQL, which returns only field values from database tables. This makes JPQL more object -oriented ... values). A Minimal JPQL Query The following query retrieves all Country objects from the database

jakarta.persistence.PersistenceUnitTransactionType

Jakarta Persistence (JPA) Enum jakarta.persistence.PersistenceUnitTransactionType java.lang. Object ... via the EntityTransaction interface. Since: Jakarta Persistence (JPA) 3. 2 Enum Constants JTA ... .Enum/compareTo(E), java.lang.Enum/describeConstable(), java.lang.Enum/equals( Object ), java.lang.Enum

jakarta.persistence.ConstraintMode

Jakarta Persistence (JPA) Enum jakarta.persistence.ConstraintMode java.lang. Object ∟ java.lang ... Used to control the application of a constraint. Since: Jakarta Persistence (JPA) 2 .1 Enum ... /compareTo(E), java.lang.Enum/describeConstable(), java.lang.Enum/equals( Object ), java.lang.Enum

jakarta.persistence.criteria.Nulls

Jakarta Persistence (JPA) Enum jakarta.persistence.criteria.Nulls java.lang. Object ∟ java.lang ... (Expression, Nulls) CriteriaBuilder.desc(Expression, Nulls) Since: Jakarta Persistence (JPA) 3. 2 Enum ... (), java.lang.Enum/compareTo(E), java.lang.Enum/describeConstable(), java.lang.Enum/equals( Object

jakarta.persistence.ValidationMode

Jakarta Persistence (JPA) Enum jakarta.persistence.ValidationMode java.lang. Object ∟ java.lang ... (JPA) 2 .0 Enum Constants AUTO If a Bean Validation provider is present in the environment ... .Enum/compareTo(E), java.lang.Enum/describeConstable(), java.lang.Enum/equals( Object ), java.lang.Enum

jakarta.persistence.criteria.LocalDateField

Jakarta Persistence (JPA) Class jakarta.persistence.criteria.LocalDateField java.lang. Object ... which can be extracted from a LocalDate . Since: Jakarta Persistence (JPA) 3. 2 Public Static Fields DAY The calendar ... Methods String toString () Overrides Object .java.lang. Object /toString() Since: Jakarta Persistence (JPA

jakarta.persistence.criteria.LocalTimeField

Jakarta Persistence (JPA) Class jakarta.persistence.criteria.LocalTimeField java.lang. Object ... which can be extracted from a LocalTime . Since: Jakarta Persistence (JPA) 3. 2 Public Static Fields HOUR The hour ... Since: Jakarta Persistence (JPA) 1.0 Public Instance Methods String toString () Overrides Object .java.lang

jakarta.persistence.criteria.LocalDateTimeField

Jakarta Persistence (JPA) Class jakarta.persistence.criteria.LocalDateTimeField java.lang. Object ... which can be extracted from a LocalDateTime . Since: Jakarta Persistence (JPA) 3. 2 Public Static Fields DATE ... Methods String toString () Overrides Object .java.lang. Object /toString() Since: Jakarta Persistence

jakarta.persistence.criteria.JoinType

Jakarta Persistence (JPA) Enum jakarta.persistence.criteria.JoinType java.lang. Object ∟ java.lang ... . Since: Jakarta Persistence (JPA) 2 .0 Enum Constants INNER Inner join. Since: Jakarta Persistence ... .lang.Enum/describeConstable(), java.lang.Enum/equals( Object ), java.lang.Enum/finalize(), java.lang.Enum