Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

enum type spring boot entity

Solution in simple: 
1- create new class with the required name, then put all the enums
public enum ResourceType {
    FINANCIAL,RAW,FACTORY,LAB
}

2-Next, in the entity :
@Enumerated(EnumType.STRING)
@Column(name="resourceType")
private ResourceType type;

 
PREVIOUS NEXT
Tagged: #enum #type #spring #boot #entity
ADD COMMENT
Topic
Name
8+7 =