Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
1 answer
23 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
1 answer
42 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
43 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
20 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
17 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
45 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
20 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
60 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
0 votes
1 answer
25 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
1 vote
0 answers
13 views

Consider defining a bean named 'entityManagerFactory' in your configuration, required a bean named 'entityManagerFactory' that could not be found

I'm getting the below error when I try to run a Spring Boot web application. This is a web application which having thymeleaf and JPA. Description: Field checkListRepository in com.example.demo....
Chamara Maduranga's user avatar
-1 votes
0 answers
18 views

Aggregated One-to-many field not being saved properly into the database with Spring Data

I'm trying to make a simple restful app and got stuck on testing the repo level. For the educational purpose it's not allowed to use Spring Boot. I need to have a One-to-many, Many-to-Many, Many-to-...
Vlad's user avatar
  • 1
2 votes
3 answers
92 views

one-to-many: JPA generates wrong FK while using ddl-auto=create-drop

It seems that I made a mistake somewhere but I can not see where. JPA insists on generating a unique constraint on a FK of one-to-many relationship on the child side. This constraint prevents me from ...
zappee's user avatar
  • 21.9k
0 votes
0 answers
40 views

Why is spring not inserting value into ID column

I am trying to successfully map two classes in an OneToOne relationship; mainly because my User class needs two Ids that are GeneratedValue. I've used Lombok for getter setters and constructors ; I'm ...
Ribash Sharma's user avatar
0 votes
0 answers
33 views

JPA console error in IntelliJ IDEA 2024.1.4

I try to select entity in IntelliJ IDEA Ultimate, but I get error: java.lang.ClassNotFoundException: jakarta.json.bind.JsonbException PluginClassLoader(plugin=PluginDescriptor(name=Jakarta EE: ...
Papp Zoltán's user avatar
-2 votes
2 answers
61 views

Java Spring Boot JPA database connection issue

Im working on Java Spring Boot application, and have a problem with connection to database via JPA. JPA cannot connect to my db. I tried many url configurations, but connection failed and such ...
koszatree's user avatar

15 30 50 per page