skip to Main Content

Postgresql – Using an @Entity in an @IdClass as @Id

I have an entity that looks like this @Entity @IdClass(AId.class) class A { @Id private String userName @Id @NotNull @JoinColumn(name = "location_id", referenceColumnName = "id", nullable=false, foreignKey = @ForeignKey(name = ...)) private Location location; private String userInformation; } The class…

VIEW QUESTION

Postgresql – DB lock with any isolation is not working as expected in Spring boot JPA application

I have a simple database table (PostgreSql) with the following data In the spring boot JPA application, the corresponding Entity class for this table is defined as follows import java.time.LocalDateTime; import org.hibernate.annotations.UpdateTimestamp; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; import lombok.AllArgsConstructor;…

VIEW QUESTION

Postgresql – Spring JPA with docker compose: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' or 'hibernate.dialect'

I am unable to connect my spring boot application to a PostgreSQL database using Spring JPA. Below is my application.yaml file. spring: application: name: jaah datasource: url: jdbc:postgresql://db:5432/taah username: waah password: blah driverClassName: org.postgresql.Driver jpa: database-platform: org.hibernate.dialect.PostgreSQLDialect hibernate: ddl-auto: update…

VIEW QUESTION
Back To Top
Search