Fix ajax and JPA model