Hibernate implementation.