Tag Archives: Hibernate

Hibernate : Adding an enum as a property

Using Hibernate Annotations: @Entity public class TestEntity {   @Enumerated(EnumType.STRING)    @Column(name=”ENUM_TYPE”)    private TestEnum testEnum;  } Using XML Based Mapping :   Add  hibernate-annotations.jar in your classpath during deployment but there’s no compile-time dependency: <property name=”testEnum” length=”30″ column=”testEnum” lazy=”false”> <type … Continue reading

Posted in Hibernate, java | Tagged | Leave a comment