Top "Jpa" questions

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects/classes and a relational database.

JPA Native Query select and cast object

I have got an Object Admin which extends User. By default both Objects are in the table User_ of my …

java sql jpa jpql
Please explain about insertable=false and updatable=false in reference to the JPA @Column annotation

If a field is annotated insertable=false, updatable=false, doesn't it mean that you cannot insert value nor change the …

java jpa jakarta-ee eclipselink
%Like% Query in spring JpaRepository

I would like to write a like query in JpaRepository but it is not returning anything : LIKE '%place%'-its …

java jpa spring-data-jpa
"detached entity passed to persist error" with JPA/EJB code

I am trying to run this basic JPA/EJB code: public static void main(String[] args){ UserBean user = new UserBean(); …

java jpa ejb-3.0
When to use EntityManager.find() vs EntityManager.getReference() with JPA

I have come across a situation (which I think is weird but is possibly quite normal) where I use the …

java jakarta-ee jpa persistence
JPA CriteriaBuilder - How to use "IN" comparison operator

Can you please help me how to convert the following codes to using "in" operator of criteria builder? I need …

hibernate jpa orm jpa-2.0 criteria-api
Map enum in JPA with fixed values?

I'm looking for the different ways to map an enum using JPA. I especially want to set the integer value …

java spring orm jpa enums
Difference between save and saveAndFlush in Spring data jpa

I am trying to learn spring data JPA by testing some CRUD operation via JpaRepository. I came across two methods …

java spring hibernate jpa spring-data-jpa
Spring Data JPA map the native query result to Non-Entity POJO

I have a Spring Data repository method with a native query @Query(value = "SELECT g.*, gm.* FROM group g LEFT …

spring hibernate jpa spring-data pojo
How To Define a JPA Repository Query with a Join

I would like to make a Join query using Jpa repository with annotation @Query. I have two tables: table user …

java jpa orm repository jpql