I see another solution is to set the annotation processor option org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor#ADD_GENERATED_ANNOTATION to false.