Skip to main content

Questions tagged [jpa]

The Jakarta Persistence API (formerly Java Persistence API) (JPA) is a Java specification for accessing, persisting, and managing data between Java objects/classes and a relational database. JPA was defined as part of the EJB 3.0 specification as a replacement for the EJB 2 CMP Entity Beans specification. JPA is now considered the standard industry approach for Object to Relational Mapping (ORM) in the Java Industry.

jpa
0 votes
0 answers
11 views

JPA @Procedure multiple out parameters

Here is my working code: public interface CandidatRepository extends JpaRepository<Candidat, String> { @Procedure(procedureName = "garnuche.INSCRIPTION_TEST") ...
Tyvain's user avatar
  • 2,690
0 votes
1 answer
32 views

Why does enum cause type mismatch when saving in postgresql from JPA?

I have a user object defined as such @Entity @Table(name = "user_account") public class User { public enum Role { CLIENT, ADMIN } @Id @GeneratedValue(...
benwl's user avatar
  • 430
0 votes
0 answers
6 views

How/where can I configure the JPA query used for a nested collection property?

I'm rewording (hopefully simplifying) my previous question as it got no response. When a Parent Entity contains a List<Child> property, how can I control/configure/override the default Parent ...
abdlost's user avatar
  • 21
0 votes
0 answers
9 views

Workaround for using DetachedCriteria with JPA & Hibernate-6?

In my org, many applications heavily depend on the DetachedCriteria of Hibernate. The application sends DetachedCriteria to the library which internally uses hibernate sessions and sends the result ...
Narendra Yadav's user avatar
0 votes
1 answer
15 views

Why Join attribute appending with join column?

I have two entity @Entity @Table(name = "Student") class Student{ @Id @Column(name = "Id") private Integer id; @Column(name = "name") private String name; @OneToMany(...
TeamZ's user avatar
  • 361
0 votes
0 answers
20 views

Joining Entities by a Range - Hibernate

I have a question regarding Hibernate that's been bothering me for some time. Consider I have two entities: @Entity public class Statement { @Id @Column private int id; @Column ...
Krusty the Clown's user avatar
1 vote
0 answers
25 views

Column <name> is of type json but expression is of type smallint[]

There is field of json type in postgres db named data_processing_steps. It's defined in category entity as @Type(JsonType.class) @Column(columnDefinition = "json") private Set<...
Lesha Pipiev's user avatar
  • 3,301
0 votes
1 answer
16 views

How to reduce time taken by createEntityManagerFactory

I'm setting up unit tests for my company application. It's set up to create a new docker container of the database for every test, so each test has a fresh database to work with. However, I get an IO ...
Supetorus's user avatar
0 votes
0 answers
9 views

record content lost with jooq 18 + spring boot 3.2 + jpa annotations [updated]

I'm working on a small tutorial project that will have both jooq and various spring database implementations. The idea is to demonstrate a core module with nearly everything plus minimal, easily ...
bgiles's user avatar
  • 1,210
0 votes
0 answers
37 views

JPA repository findBy return different result when using H2 and MySQL

This is the simply version of my application. I have 2 entity. Customer.java package com.udacity.jdnd.course3.critter.user; import java.util.List; import java.util.ArrayList; import com.udacity.jdnd....
user26256859's user avatar
0 votes
0 answers
16 views

[spring-boot]open api can't be stored in mysql database

bonjour, I have a unsolvable problem ... help me I downloaded XML open api file and parsed that in spring boot. Even though mysql db was successfully connected, data wasn't stored in my db table. Only ...
김렁뚱땅's user avatar
0 votes
1 answer
49 views

JPA entity ID field with a SQL Server 2022 Sequence

I am trying to connect my Spring Boot service to a SQL Server 2022 database, but I am having issues with a sequence: public class SomeEntity { @Id @SequenceGenerator(name = "some_seq"...
kayelbb's user avatar
  • 55
-2 votes
0 answers
38 views

Create Docker container with both mysql and tomcat [closed]

I've been trying to build a tomcat-mysql docker container for days but I've run into some problems. I've come to realize that, once built, it doesn't seem to be able to find my resources path in the ...
LukeFer's user avatar
  • 27
1 vote
0 answers
20 views

Reuse javax.persistence.criteria.Join inside Specification class

for ilustration purposes, lets say I have a Student table with some data and one School table . The Student table has a Foreign Key to School table. Using Spring data I have something like this: @...
fernando1979's user avatar
  • 1,897
0 votes
1 answer
23 views

Spring JPA JoinTable

I have three entities. I want to save a survey. The survey will contain all the data that is neccessary:id,section, questions. The survey_section_question table is created successfully and when I want ...
onner's user avatar
  • 133

15 30 50 per page
1
2 3 4 5
3479