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
Back To Top
Search