fixed jpa and sql