Integration with hibernate