adjusting architecture with hibernate