About EntityManager

81-90 of 200Refresh
Forum
18

EntityManager.merge gives EntityNotFoundException

Just started using objectdb (2.3.4). Calling EntityManager.merge for a new (non-managed) object gives EntityNotFoundException. I am perplexed by this. See attached test case. Thanks for your assistance. Full error output is: Exception in thread "main" [ObjectDB 2.3.4] javax.persistence
Forum
18

javax.persistence.PersistenceException: No Persistence provider for EntityManager named in Karaf 4.0.7 and OSGi DS test

.persistence.PersistenceException: No Persistence provider for EntityManager named objectdb://localhost:6136
Forum
18

"No Persistence provider for EntityManager" in OSGI bundle.

provider for EntityManager named $objectdb/myDB.odb at javax.persistence.Persistence
Forum
18

multi EntityManager with Spring Boot, but 'Too many persistable types (>10)

I'm trying to use two EntityManager with Spring Boot, but no luck with 'Too many persistable types (>10) - exceeds evaluation limit' at second database. My purpose is converting database (converting model entity. same class name but different package). Single application with Spring-Boot 2.1.8
Manual
17

Query Parameters in JPA

getCountryByName(EntityManager em, String name) { TypedQuery query = em.createQuery ... Country getCountryByName(EntityManager em, String name) { TypedQuery query = em ... without parameters: public Country getCountryByName(EntityManager em, String name) { TypedQuery
Tutorial
17

Step 3: Define an EJB Session Bean

; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import ... class GuestDao { // Injected database connection: @PersistenceContext private EntityManager ... ). Prepares an EntityManager automatically and injects it into the em field (because it is annotated
Tutorial
17

Step 3: Define an EJB Session Bean

.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery ... : @PersistenceContext private EntityManager em; // Stores a new guest: public void persist(Guest guest ... shown in the next step). Prepares an EntityManager automatically and injects it into the em field
Manual
17

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 EntityManager. @PostRemove - after deleting an entity from the database (during commit or flush). An entity
Issue
17

InternalException during EntityManager.find()

InternalException during EntityManager.find()
Result
14

ObjectDB Object Database Features

entity object cache (per EntityManager). L2 shared entity data cache (per EntityManagerFactory ... availability and fault tolerance. Online Backup Online backup by a simple query on an EntityManager