Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-215

Change way that SQL objectstore determines the properties of an object to be persisted

    XMLWordPrintableJSON

Details

    Description

      Noticed that in some circumstances the database table that SQL object store attempts to create had duplicate column names. Tracked this behaviour down to the logic within org.apache.isis.runtimes.dflt.objectstores.sql.auto.AbstractAutoMapper - the setUpFieldMappers() method can be called into recursively, meaning that the simple aggregation of columns into a list (as then used by the setUpFullMapping method is not sufficient).

      Although I don't understand everything that is going on here, it seems that a safer way to proceed is to use a Map and to key the elements by the ObjectAssociation (ie property); that way there can only ever be one "thing" added per processed field.

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: