Questions tagged [hibernate-jpa]

53 questions
0
votes
0 answers

JPA error in merge: Password expired error if insert only

We are using entitymanager merge method to either update (if existing) or insert (if not existing) records in a certain table. What happens is if it is an update, there are no errors, but if it is insert, we see the following error from our…
0
votes
1 answer

How to avoid child of child objects in Spring JPA?

I am using Spring JPA. I have three entities Student, ClassRoom and School like below @Entity public class Student implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name="id") private int id; …
Sathya
  • 233
  • 1
  • 4
  • 13
0
votes
1 answer

Hibernate JPA is generating select query everytime when findOne(String id) is called with same parameter value

Hibernate findOne(String id) is taking to much time (more than 300ms) in our case. This is not consistent as well. For some request, it is returning the result in less than 100ms. So we want to improve the performance of findOne where it should not…
0
votes
2 answers

hibernate JPA unknown column in 'field list'

I am writing a spring boot + Hibernate JPA application and i my hibernate code is not working in that below are the details Entity Class: @Entity @Table(name="user") public class UserBean { @Id @GeneratedValue(strategy =…
user3927150
  • 61
  • 1
  • 2
  • 9
0
votes
1 answer

Spring boot routing datasource not work correctly

I am configuring spring boot web app with Postgres, Hibernate, Atomikos, JPA and Thymeleaf. I use AbstractRoutingDataSource to route to new datasource as below: @Override protected Object determineCurrentLookupKey() { String…
Thanh Dong
  • 3
  • 2
  • 6
0
votes
2 answers

JBoss WildFly 11, Hibernate ORM 5.2, OGM 5.3 and MongoDB - OgmIntegrator not found

Progressing slowly through trying to get Hibernate ORM 5.2 working with OGM 5.3 so I can use JPA with MongoDB. To remove the JNDI look-up error, referenced in the OGM FAQs: When using Hibernate OGM on top of WildFly, I’m getting a JndiException.…
NOTiFY
  • 1,255
  • 1
  • 20
  • 36
0
votes
1 answer

C3P0 Pool connects to the wrong MySQL server

I have a strange case on C3P0 connection pool configured with Hibernate JPA via persistence.xml. This is my persistence.xml:
Pete Houston
  • 14,931
  • 6
  • 47
  • 60
-1
votes
2 answers

Hibernate @OneToMany Mapping fetching records

I have googled everywhere but unable to get what I need Unable to get the respective output. I have two classes Employee and EmployeeLocation and their respective tables in SQL. This is my table For EmployeeLocation Table multiple emp_ids…
1 2 3
4