Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.2.0-incubating
-
None
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.