All Questions
Tagged with jpa postgresql
2,087
questions
0
votes
0
answers
5
views
Title: Improving Performance for Netting and Settlement Cron Job in Spring JPA
I am working on a netting and settlement process in the banking and finance sector. Specifically, I need to run a cron job every 4 hours and 15 minutes to retrieve data from the transaction table for ...
0
votes
0
answers
13
views
Hibernate duplicates query for non-existing entities with OneToOne relationships
I want to prevent the duplicate SQL queries executed by hibernate, as my underlying relation is a complex view, (although maybe postgresql might cache the result, but still I would vastly prefer if ...
1
vote
1
answer
48
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(...
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<...
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 ...
0
votes
1
answer
44
views
is there any way to write test cases for repositories in spring boot without using H2 daatabase?
I am working on a Spring Boot application and need to write test cases for my repository layer in a way like database should create using my flyway script. However, I want to avoid using an in-memory ...
-1
votes
0
answers
15
views
Parameterize jsonb specfic key with Spring Jpa
There is a list having once column jsonb type .
{
"quoteId":2024,
"quoteName":"EDE",
"quoteDetails" :[
"id":3156,
"metadata":[
"code&...
0
votes
0
answers
13
views
Concatenating foreign tables in JPA Java
I have two Entity where one entity is referencing a foreign key from the other. I want to concat the name field from one entity and the name field of the other entity into a new dummy field.
Like so
@...
1
vote
1
answer
49
views
@JoinTable twice with different conditions
This question applies to a Java 17 web application running spring boot 3.2.4 and a postgres database.
I have the following schema, two entities related through a join table:
The project_contact.type ...
1
vote
1
answer
40
views
I don't understand why a simple JoinTable is this slow with Spring boot compared to SQL JOIN TABLE
I have two really simple JPA Spring Entities : Farm and Coordinates
@Entity
@Getter
@Setter
@Table(name = "farms")
public class FarmEntity {
@Id
Long id;
@Column(name = "...
0
votes
1
answer
79
views
Improve execution time of a query that populates data
Good morning everyone, how are you?
I need help related to a process whose popular purpose is data from one table to another, at the moment I'm using spring boot with native query, but it's taking ...
0
votes
0
answers
39
views
Pre-bound JDBC Connection found!JpaTransactionManager doesnot supportrunning withinDataSourceTransactionManager if toldto manage theDataSource itself
In my application I am using single data source and single jpa transaction manager. I am using Java version of 11 and spring version of 2.5.2. Here is my config
@Bean
@Primary
@DependsOn({
"...
0
votes
1
answer
47
views
Error duplicate key value violates unique constraint "products_pkey" Detail: Key (product_id)=(2) already exists. Product extends AbstractEntity<Long>
Im trying to persist this entity in Db using a JPA repository:
@Entity
@Table(name = "products")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@AttributeOverride(name = "id&...
0
votes
0
answers
19
views
JPA & PSQL: Allow commit in database-function
TL;DR:
I need a database procedure that runs entirely independent of the calling backend service and commits when finished.
I have a database procedure that might run up to several hours
create ...
1
vote
0
answers
49
views
The batch insert is not being applied in PostgreSQL
I want to apply batch insertion using PostgreSQL, but even after searching online, I couldn't easily solve it. Currently, I'm using spring-boot 3.3.0v and PostgreSQL 16. Could you help me figure out ...