About entities

81-90 of 200Refresh
Forum
18

List managed entities for a given entity manager

Hi, Is there a way to find the number of managed entities given an entity manager? My application has some memory leaks - I am doing clear() on the entity manager(s) but may be I forgot some - so if there is a way to know how many entities are managed by each my entity mgr - it would be helpful
Manual
18

DELETE Queries in JPA/JPQL

As explained in chapter 2, entity objects can be deleted from the database by: Retrieving the entity objects into an EntityManager. Removing these objects from the EntityManager within an active ... an alternative way for deleting entity objects. Unlike SELECT queries, which are used to retrieve data from
Result
18

ObjectDB Object Database Features

file size up to 128 TB (= 131,072 GB = 134,217,728 MB). Up to 2,147,483,648 entity classes per database file. Up to 2,147,483,648 indices per database file. Up to 9,223,372,036,854,775,808 entity ... entity object cache (per EntityManager). L2 shared entity data cache (per EntityManagerFactory
Manual
18

Auto Generated Values

for entity objects with no primary key fields defined (as explained in the previous section). The same ... @GeneratedValue with the AUTO strategy: @Entity public class EntityWithAutoId1 { @Id @GeneratedValue ... definition is equivalent: @Entity public class EntityWithAutoId2 { @Id @GeneratedValue long
Manual
18

JPA Named Queries

is attached to exactly one entity class or mapped superclass - usually to the most relevant entity ... carefully to avoid collision (e.g. by using the unique entity name as a prefix). It makes sense to add the above @NamedQuery to the Country entity class: @Entity @NamedQuery(name="Country.findAll
Forum
18

find out if an entity is refered by other entities

Hello, it is possible to find out if a child entity is just referenced by other parent entity types. But the types of the parent entities are unknown. Is there a possibility to find out if an entity is referenced? best regards You can only find it (using a query) for a specific relationship
Forum
18

An ArrayIndexOutOfBoundsException with nested entities and enhanced entities

.8_06 All our entities are enhanced. There are nested entities in following hierarchy: @Entity ... with the previous exception? No, there are only entities involved. Have you an idea why this issue
Manual
17

JPA Metamodel API

to retrieve sets of types: // Get all the managed classes: // (entity classes, embeddable classes ... (); // Get all the entity classes: Set allEntityTypes = metamodel.getEntities ... instance: // Get a managed type (entity, embeddable or mapped super classes): ManagedType
Forum
16

Entity is not related to ObjectDB, but i get exception from ObjectDB

Here is the description of the problem we are facing:
We have an entity DialogActionNew ... Hibernate
When getting this entity from PostgreSQL with the key EntityManager.find(id), we receive another entity - DialogNew, which has an exception: ERROR [org.jboss.ejb3.invocation] (pool-18-thread-1
Forum
15

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock