Made project work with hibernate