basic working example with hibernate