Top "Entitymanager" questions

The EntityManager is the representation of a PersistenceContext, allowing a user to manipulate data pulled from a database.

Inserting in my JPA using entity manager native query

I am trying to insert a data in my database, i am using JPA in my project. This is what …

jpa entitymanager
No Persistence provider for EntityManager named X

I am developing a JavaSE application using JPA. Unfortunately, I get null after calling: Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); Below …

java jakarta-ee jpa entitymanager persistence.xml
Different ways of getting the EntityManager

The usual idiom I see for creating the EntityManager is something like this: public class BaseDao { private static final String …

java jpa entitymanager
Injecting EntityManager Vs. EntityManagerFactory

A long question, please bear with me. We are using Spring+JPA for a web application. My team is debating …

java spring jpa entitymanager
How to persist a lot of entities (JPA)

I need to process a CSV file and for each record (line) persist an entity. Right now, I do it …

java jpa entitymanager
EntityManager refresh

I have web application using JPA. This entity manager keeps bunch of entites and suddenly I update the database from …

java jpa entitymanager
@Autowired vs @PersistenceContext for EntityManager bean

What is the difference between: @Autowired private EntityManager em; versus: @PersistenceContext private EntityManager em; Both options work in my application, …

spring jpa entitymanager
JPA, Entity manager, select many columns and get result list custom objects

How I can get list of custom objects, like results below query: SELECT p.category.id, count(p.id) FROM …

java hibernate jpa jpa-2.0 entitymanager
What is the difference between EntityManager.find() and EntityManger.getReference()?

Whats is the difference between <T> T EntityManager.find(Class<T> entityClass, Object primaryKey) and <…

java jpa entitymanager
EntityManager refresh problem

I'm getting this error from my EntityManager when I call the refresh function. public void saveProduct(Product product) { entityManager.refresh(…

hibernate spring orm jpa entitymanager