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

The generated scaffold may fail to compile when array-typed fields are present in the JPA entities

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 1.3.3.Final
    • Fix Version/s: 1.4.0.Final
    • Component/s: Scaffold
    • Labels:
      None

      Description

      This is from the Sakila-h2 model and happens occasionally in this model depending on JPA field order in the Staff class, but could be more frequent in other models.

      The scaffold generator is unable to distinguish between array types and corresponding primitive types, thus resulting in code that is syntactically invalid, like:

            byte picture = this.example.getPicture();
            if (picture != 0)
            {
               predicatesList.add(builder.equal(root.get("picture"), picture));
            }
      

      where the picture field in the JPA entity is of type byte[].

      This also seems related to FORGE-918 where information about array-types is lost.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vineet.reynolds Vineet Reynolds
                  Reporter:
                  burrsutter Burr Sutter
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: