skip to Main Content

Cannot query Enum with Spring JPA and Postgresql

So i have this ENUM in my PostgreSQL: CREATE TYPE process_status AS ENUM('CREATED','ONGOING','DONE'); ALTER TABLE process ADD status process_status NOT NULL DEFAULT 'CREATED'; In my code: @Getter public enum Status { CREATED("Created"), ONGOING("Ongoing"), DONE("Done"); private final String status; Status(String status)…

VIEW QUESTION

I am using MongoDB as a database in Spring Boot. But I am getting a problem while adding the data

These are my Entities:- This is my rider Rider entity package com.app.enities; import lombok.*; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.util.List; @Document(collection = "Rider") @Getter @Setter @AllArgsConstructor @NoArgsConstructor @ToString(callSuper = true) public class Rider { @Id private String id; private String…

VIEW QUESTION

Mysql – Spring JPA – Query Methods

I have this table: @Entity @Table(name = "t_tropical", uniqueConstraints = @UniqueConstraint(columnNames = { "name", "sign", "isRetro", "house", "lang"})) @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder @ToString public class Tropical { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private String…

VIEW QUESTION
Back To Top
Search