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

Generated JAX-RS endpoing code from entities is wrong for primitive types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.17.0.Final
    • 2.13.0.Final
    • Java EE
    • None
    • Hide

      ASSERT: Have some Entity with a field of primitive type.
      EXEC: Open wizard "REST: Generate Endpoints From Entities" and proceed.

      RESULT: Generated class contains wrong code for comparisson of ids in update method.
      EXPECTED RESULT: Generated class contains correct comparisson of ids in update method.

      Show
      ASSERT: Have some Entity with a field of primitive type. EXEC: Open wizard "REST: Generate Endpoints From Entities" and proceed. RESULT: Generated class contains wrong code for comparisson of ids in update method. EXPECTED RESULT: Generated class contains correct comparisson of ids in update method.

    Description

      I used forge to generate JAX-RS endpoints from Entities (those were created by reversed engineering from H2 database). Entity contains primitive long type for ID. In generated JAX-RS endpoint there is a method update which looks like this

      public Response update(@PathParam("id") long id, ConferenceDTO dto)

      even though there is a primitive long ID as parameter, the method generate this code

       (!id.equals(dto.getId()))

      which is wrong.

      Attachments

        Activity

          People

            rhn-support-ggastald George Gastaldi
            mlabuda_jira Marián Labuda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: