Answers for "jpa enum as string"

0

jpa enum as string

@Entity
public class Article {
    @Id
    private int id;

    private String title;

    @Enumerated(EnumType.ORDINAL)
    private Status status;

    @Enumerated(EnumType.STRING)
    private Type type;
}
Posted by: Guest on June-10-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language