Hi, I am using a enum type in postgres.
When automatically generating the schema, how can I get the column on the table to have the right type = the enum type.
Also have can I create the enum in the database before the ddl is executed ?
When I create the schema the column is a character
Quote:
property name="hibernate.hbm2ddl.auto" value="create-drop" />
Quote:
CREATE TYPE option AS ENUM (
'art_delivery',
'binding_side');
Code:
@Enumerated(EnumType.STRING)
@Column(name = "option_type", nullable = false)
private Option optionType;
Code:
public enum Option {
ART_DELIVERY("art_delivery"),
BINDING_SIDE("binding_side");