added database support with hibernate. Many not works!!!