jpa code was not correct. should create unit tests before