Migrated to hibernate 4