Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1467

Updating an entity with DataNucleaus provider leads to inserting a new entity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 1.1.0.M3
    • Fix Version/s: 1.1.0.RELEASE
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      1. Create an application using either of the following scripts (the only difference is DATANUCLEAUS vs. DATANUCLEAUS_2)

      // DATANUCLEAUS (1)
      project --topLevelPackage com.vmforce.dndemo
      persistence setup --provider DATANUCLEUS --database H2_IN_MEMORY
      entity --class ~.domain.Fan --identifierType java.lang.String
      field string --fieldName firstName
      field string --fieldName lastName
      field date --fieldName joinDate --type java.util.Date
      controller all --package ~.web

      // DATANUCLEUS_2
      project --topLevelPackage com.vmforce.dndemo
      persistence setup --provider DATANUCLEUS_2 --database H2_IN_MEMORY
      entity --class ~.domain.Fan --identifierType java.lang.String
      field string --fieldName firstName
      field string --fieldName lastName
      field date --fieldName joinDate --type java.util.Date
      controller all --package ~.web

      2. Run the resulting web app
      3. Create an entity
      4. Update that entity
      5. In List all Fans, you will see two entities: one with original values and another with updated.

      The same project works fine with HIBERNATE, ECLIPSELINK, or OPENJPA as providers. So this is probably DATANUCLEAUS bug (specifically, how it implements EntityManager.merge()). However, if possible, we may have to compensate for that in Roo.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                ramnivas Ramnivas Laddad
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: