fixed some errors in jpa constraints