Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2891

@Generated annotation cannot be disabled for static metamodel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.2.0
    • 3.2.1
    • None
    • None

    Description

      The @Generated annotation will be added to any generated static metamodel class, no matter the annotation is available.
      From Java9 upwards, this annotation is not on the classpath anymore (by default), leading to compile errors.

      I would suggest to add either an override parameter (similar to hibernate, -AaddGeneratedAnnotation=false, see https://docs.jboss.org/hibernate/orm/5.0/topical/html/metamodelgen/MetamodelGenerator.html

      Or
      detect whether the annotation is on the classpath.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bmarwell Benjamin Marwell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: