Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-870

Faces scaffold does not generate form fields for @Id fields not annotated with @GeneratedValue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0.Final
    • 1.2.3.Final
    • Scaffold
    • None

      The Faces scaffold does not generate any form fields for @Id annotated fields. This is because the Metawidget JPAInspector used by the scaffold plugin is configured to hide Ids.

      This should however be done conditionally, when the @Id field is also annotated with a @GeneratedValue, since attempting to create a new entity instance without a provided id, results in the following error being displayed:

      org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save()

              vineet.reynolds_jira Vineet Reynolds (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: