hibernate-entitymanager Questions

3

Solved

I am building a CRUD application where I am using spring data jpa to work with Database. I don't want to give schema name in my entity class, like mentioned below. @Entity @Table(name = "PROPERT...

6

Solved

I have private EntityManager em; public List getAll(DetachedCriteria detachedCriteria) { return detachedCriteria.getExecutableCriteria("....").list(); } How can I retrieve the session...
Blinding asked 10/11, 2010 at 19:24

2

Hibernate checks the state of entities when committing transactions. This is useless and performance-critical when fetching large amounts of data to send to the client. I found a solution with ent...
Loveless asked 7/6, 2022 at 13:36

1

Solved

I have a spring boot 2.4.0 application that connects to 2 different data sources. I keep getting this error. I searched for solutions all over internet. I found that I need to specify only one of m...
Cristobalcristobalite asked 14/6, 2021 at 8:17

4

When I'm trying to create a new EntityManager to persist my data, i get the following Error: javax.persistence.PersistenceException: Unable to build entity manager factory I using the JPA-Persist...

8

Solved

I am new to Hibernate and I'm not sure whether to use a Hibernate SessionFactory or a JPA EntityManagerFactory to create a Hibernate Session. What is the difference between these two? What are th...

2

This question is specifically about programmatically creating a JPA EntityManagerFactory backed by Hibernate 5, meaning without configuration xml files and without using Spring. Also, this question...

2

Solved

I have a project called main_project (uses spring-boot v2) that contains all configuration classes including JPA configuration. The main_project also has entity classes (Like User, Personnel). The...
Thorbert asked 17/6, 2018 at 5:57

2

Solved

I'm using Hibernate as a JPA provider (I'm using its EntityManagerFactory instead of its SessionFactory) in a Spring Framework application. I managed to get Spring Framework's load time weaving sup...

3

Solved

I was using Servlets, PostgreSQL and Hibernate with EntityManager to build a Web app and everything was working ok until I moved the project to a Maven based project. Now I'm getting this weird exc...
Eachelle asked 10/9, 2015 at 15:27

1

Solved

I'm currently using Spring and Hibernate framework, and have an entity with: @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="ID") private Long id; @Column(name="ACC_ID") priva...
Buskined asked 24/7, 2015 at 4:10

3

Solved

I am not able to run the following test:- @Test public void test() { EntityManager em = entityManagerFactory.createEntityManager(); em.getTransaction().begin(); CriteriaBuilder builder = em.ge...
Carafe asked 2/11, 2010 at 11:14

2

Solved

I'm using Spring Framework 3.1 with Hibernate 4.1 as a JPA provider, and I have a fully functional setup, but every time the web app is started I see this warning message: 14:28:12,725 WARN pool-2...
Bust asked 2/6, 2012 at 22:0

3

Solved

I am using Hibernate 4.1.7 and trying to update object, but theres no documentation how it should be done. Currently, I am doing this: Person person = personDao.getPersonById(1); person.setAge(2...
Fostoria asked 27/10, 2012 at 18:9

1

Solved

Hi I have a simple DAO with the below function. public element createElement(Element e){ em.persist(e); em.flush(); return e; } The Entity table has a unique constraint on the pair (type,v...
Caia asked 24/2, 2012 at 16:17

2

Solved

I have two Entity (tables) - Employee & Project. An Employee can have multiple Projects. Project table's CREATOR_ID field refers to Employee table's ID field. Employee entity does not maintain ...
Delenadeleon asked 14/1, 2011 at 19:31

1

Solved

i have a simple question. Its possible to add dependency injection via @Ressource or @Autowired to the Hibernate Eventlistener? I will show you my entitymanagerfactory configuration: <bean id...
Hartzell asked 10/11, 2010 at 11:17

1

Solved

I'm attempting to use hibernate entity manager with mysql and glassfish. I'm getting the following error when attempting to use a JTA datasource: Caused by: org.hibernate.HibernateException: The ...
Chauncey asked 1/3, 2010 at 22:40
1

© 2022 - 2025 — McMap. All rights reserved.