Category Archives: Hibernate

Hibernate – Oracle : Creating Index For Foreign-Key Columns

In Oracle adding Index for Foreign Key columns is  important for performance reasons.  And also if you are using transactions,  It is important to create index for FK columns.  With out  index your application may experience many deadlock problems. These indexes are automatically generated for MySQL … Continue reading

Posted in Hibernate, java | Leave a comment

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