#  Exclude or Customize Generated Comments in JPA Metamodel Files

**URL:** <https://discourse.hibernate.org/t/exclude-or-customize-generated-comments-in-jpa-metamodel-files/10855>\
**Category:** Hibernate ORM\
**Created:** [January 7, 2025, 12:44pm UTC](https://discourse.hibernate.org/t/exclude-or-customize-generated-comments-in-jpa-metamodel-files/10855 "2025-01-07T12:44:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhamed\_Karic](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/muhamed_karic/32/3756_2.png) [@Muhamed\_Karic](https://discourse.hibernate.org/u/Muhamed_Karic)\
**Post date:** [January 7, 2025, 12:44pm UTC](https://discourse.hibernate.org/t/exclude-or-customize-generated-comments-in-jpa-metamodel-files/10855/1 "2025-01-07T12:44:02Z")

</div>

I am using the `hibernate-jpamodelgen` processor to generate JPA metamodel files in my project. During the build process, warnings are generated for `@see` comments in the generated code, referencing private fields in the entity classes. Below is an example:

```auto
/**
 * @see com.example.MyEntity#privateField
 **/
public static volatile SingularAttribute<MyEntity, SomeType> privateField_;

```

This causes warnings during the build, as the private field is inaccessible. These warnings pollute the logs and can lead to unnecessary noise in CI/CD pipelines.

**Request** : Please provide a way to:

1. Suppress or exclude comments in the generated files.
2. Configure the generated comments to avoid referencing private fields.

**Environment** :

- Hibernate JPAModelGen version: `6.5.2.Final`
- Java version: `21`
- Build tool: Maven

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [January 7, 2025, 12:52pm UTC](https://discourse.hibernate.org/t/exclude-or-customize-generated-comments-in-jpa-metamodel-files/10855/2 "2025-01-07T12:52:24Z")

</div>

This was already improved in Hibernate ORM 7: [more improvements to generated Javadoc in Hibernate Processor · hibernate/hibernate-orm@f474cac · GitHub](https://github.com/hibernate/hibernate-orm/commit/f474cacf8adf8adc8929798a065d53fedeba5732)

As you can see in [the documentation](https://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/Hibernate_User_Guide.html#tooling-modelgen-options), you can provide a list of warnings to suppress via the `addSuppressWarningsAnnotation` option.
