Home » Search

About in

51-60 of 200Refresh
Manual
11

JPA Lifecycle Events

(added to the EntityManager). @PostPersist - after storing a new entity in the database (during commit or ... - when an entity is identified as modified by the EntityManager. @PostUpdate - after updating an entity in the database (during commit or flush). @PreRemove - when an entity is marked for removal in
Manual
11

Shared (L2) Entity Cache

of this cache makes it useful in applications that use many short term EntityManager instances.  In addition ... The shared (L2) cache is configured in three scopes: Globally in the ObjectDB configuration. Per persistence unit in the persistence.xml file. Per entity class - using annotations. ObjectDB
Manual
11

CRUD Database Operations with JPA

code fragment stores 1,000 Point objects in the database: em.getTransaction().begin(); for (int i ... ) require an active transaction. In the example above, every Point object is first constructed as ... a managed entity) by the persist method. The new Point objects are physically stored in the database
Forum
11

Accessiblity of attributes in entities in several OSGi-Bundles

. There are three entities in two OSGi-Bundles and we execute importRequirements() in RequirementServiceImpl ... (RequirementImportServiceImpl.java:146) In another use case we have a similiar problem: java.lang.NullPointerException at com ... :117) These exceptions may indicate an attempt to access a new entity object that was persisted in
Forum
11

DB reading fails in debug mode in Eclipse

. Here is the structure (JDO metadata) of 3 classes which I am storing as values in a HashMap of another entity in the DB.    
Forum
11

Using Enum type in NamedQuery: Field is not found in type

I'm trying to switch an application that worked fine in Hibernate to ObjectDB and am having issues ... Type {     A,B,C } that is stored in an @Enumerated member variable private Type type; @Enumerated public Type getType() {     return type; } I then try to query this field in the following
Manual
11

JPA Query Structure (JPQL / Criteria)

. Having a SQL like syntax in JPA queries is an important advantage because SQL is a very powerful query ... and easier to use in Java. JPQL Query Structure As with SQL, a JPQL SELECT query also consists of up to 6 clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING
Manual
11

Setting and Tuning of JPA Queries

) .getResultList(); These methods can be invoked in a single expression with getResultList since the setter methods in Query and TypedQuery support method chaining (by returning the query object ... of other EntityManager instances). JPA implementations can easily make uncommitted changes visible in
Manual
11

WHERE clause (JPQL / Criteria API)

The WHERE clause adds filtering capabilities to the FROM-SELECT structure. It is essential in any ... of this query defines an iteration over all the Country objects in the database using the c range ... , the WHERE clause gets an opportunity to function as a filter. The boolean expression in
Manual
11

SELECT clause (JPQL / Criteria API)

objects. JPA 2 adds the ability to use almost any valid JPQL expression in SELECT clauses. Specifying the required query results more precisely can improve performance and in some cases ... - JPQL does not support the "SELECT *" expression (which is commonly used in SQL). Projection of Path