Default Values With Hibernate Annotations

To set the default value of a field with Hibernate, you can use the columnDefinition argument : ...

December 5, 2007 · 1 min · Dave Perrett

Hibernate OneToMany Relationships

Here’s an example of a one-to-many relationship using Spring MVC and Hibernate with annotations. The Album class has many Photo s, and each Photo belongs to an Album. ...

November 26, 2007 · 3 min · Dave Perrett

Hibernate 'TYPE=storage_engine is deprecated'

If you are getting errors similar to WARN [main] JDBCExceptionReporter.logWarnings(49) | 'TYPE=storage_engine is deprecated; use ENGINE=storage_engine instead' in hibernate, it probably means you are using MySQL5 but have your application set up for MySQL4. In your applications database settings config file ( pom.xml in my case, otherwise might be in properties.xml or something) change the hibernate.dialect setting from MySQLInnoDBDialect to MySQL5InnoDBDialect : <hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</hibernate.dialect>

November 21, 2007 · 1 min · Dave Perrett