Important properties in hibernate configuration file

There are mainly six important tags for hibernate configuration file. Hibernate configuration file naming convension is generally hibernate.cfg.xml and it is generally placed in the classpath. This can also be configured in the hibernate.properties file. If both hibernate.cfg.xml and hibernate.properties are found in the classpath then hibernate.cfg.xml overrides hibernate.properties file. Continue Reading…

Criteria API example in Hibernate

Criteria is a simplified API for retrieving entities by composing Criterion objects. This is a very convenient approach for functionality like “search” screens where there is a variable number of conditions to be placed upon the result set. The following example shows how to work with Hibernate Criteria API. Criteria Continue Reading…