Fix cycle dependency problem with jpa classes