All Questions

Tagged with
0 votes
1 answer
9 views

JPQL: How to rewrite postgres native query to JPQL query that uses filter keyword

Im trying to avoid using native query. I have this query that uses the filter function, how could I rewrite this to not use that and work in regular jpql? @Query( "SELECT time_bucket(...
  • 143
1 vote
0 answers
24 views

Spring Boot: Postgres Character Varying column returns null

I am trying to map an object of the following class to a Postgres table. class MyClass { private BigInteger id; private String text; //public setters and getters } I also have a table ...
0 votes
2 answers
38 views

Sql Count(*) from multiple tables but intersection should come

Select distinct(job_id) from A where condition Select distinct(job_id) from B where condition Select distinct(job_id) from C where condition Here may be 1,2 and 3 have some common jobId What I need ...
0 votes
0 answers
17 views

Audit PostgreSQL DML changes

I am looking for a way to audit DML changes which logs the old and new data along with the date and editor information, with editor being the logged in user. With Spring boot for Java and PostgreSQL ...
  • 577
0 votes
0 answers
26 views

Create all Entity Class Tables automatically on each new X-TenantID in Multi-Tenancy

We are developing an application with separate schema based multi tenancy with PostgreSQL and Spring Boot. I am sending the X-TenantID header in each server request as a Schema name. However, I am ...
  • 35
-4 votes
0 answers
23 views

i am not getting proper response [closed]

this is my entity class entity class @Entity @Table(name = "s_area_zone") @Data @EntityListeners(AuditingEntityListener.class) public class AreaZone implements Serializable { /** *...
0 votes
1 answer
31 views

Principal.getName() returns the email instead of username

I've an application using Spring Security. I am trying to fetch the name of the user after the successful registation of the latter but when I am getting to the login page, I get the email instead of ...
  • 148
0 votes
1 answer
47 views

Configure multiple datasources in Spring Boot application with multiple docker containers

I am currently trying to configure a spring boot application to use two different docker containers (postgres images) for two different datasources. For that, I took the code from this Baeldung ...
0 votes
0 answers
15 views

Log Postgresql sequence value that is missing in main table

Gaps on id column occurs due to the usage of sequences on PostgreSQL as the default value of the table’s primary key. When the transaction rollback the sequence value will not rollback thus the id ...
0 votes
0 answers
15 views

How to clean database tables or records with springboot and testconatiner after every test?

I have many integration tests running with Testcontainer and Springboot. I am getting this error for tests, where I am using the same objects to save in the database. org.postgresql.util.PSQLException:...
0 votes
0 answers
27 views

How I can found out, which field refers to some column in database table that I need

This is my DTO class package com.example.University.dto; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor public class FileDbDTO { private String name; private ...
-1 votes
1 answer
22 views

Connect docker container to spring boot app

I'm following a tutorial to create a mild spring boot application. I am running the IntelliJ community edition. I want to connect a docker container running Postgresql to the application. The idea is ...
  • 11
0 votes
0 answers
15 views

Symbol mongo client not found

Mongodb dependency is added to pom.xml still I am getting as mongo client not found in mongodb. Version being used is 2.4.8. I tried with different versions and also mvn dependency:tree command to ...
0 votes
0 answers
29 views

Posgresql Generate_series get all date

I have select: SELECT date, outstanding_principal FROM amortization_schedules GROUP BY date,outstanding_principal ORDER BY date. It gives the following result: | date | ...
  • 113
1 vote
1 answer
56 views

Postgresql Generate_series. Generate dates by month

I am using select SELECT asl.id, asl.outstanding_principal as outstandingPrincipal, the_date as theDate, asl.interest_rate as interestRate, asl.interest_payment as interestPayment, asl....
  • 113

15 30 50 per page
1
2 3 4 5
139