Write with jdbc and read with hibernate