opengisch / QgisModelBaker

Create QGIS projects from database schemas or Interlis models
https://opengisch.github.io/QgisModelBaker/
GNU Lesser General Public License v3.0
55 stars 17 forks source link

createEnumTabsWithId not considered in the metaconfig #903

Closed signedav closed 6 months ago

signedav commented 7 months ago

And with this often the metaconfigs exported with the Topping Exporter are broken...

[ch.ehi.ili2db]
smart2Inheritance = True
createEnumTabsWithId = True
createNumChecks = True

java -jar /home/dave/dev/opengisch/QgisModelBaker/QgisModelBaker/libs/modelbaker/iliwrapper/bin/ili2gpkg-5.0.1/ili2gpkg-5.0.1.jar --schemaimport --dbfile /home/dave/qgis_projects/metronrepo/bad_true.gpkg --coalesceCatalogueRef --createEnumTabs --createUnique --createFk --createFkIdx --coalesceMultiSurface --coalesceMultiLine --coalesceMultiPoint --coalesceArray --beautifyEnumDispName --createGeomIdx --createMetaInfo --expandMultilingual --createTypeConstraint --createTidCol --importTid --smart2Inheritance --strokeArcs --createBasketCol --defaultSrsAuth EPSG --defaultSrsCode 2056 --preScript NULL --postScript NULL --modeldir https://models.interlis.ch;https://models.opengis.ch;/home/dave/qgis_projects/nope --models Schnittstellenmodell_ARE_AG_LV95 --iliMetaAttrs NULL --metaConfig ilidata:metaconfig_topping_project_ini_001 image

[ch.ehi.ili2db]
smart2Inheritance = True
createEnumTabsWithId = False
createNumChecks = True

java -jar /home/dave/dev/opengisch/QgisModelBaker/QgisModelBaker/libs/modelbaker/iliwrapper/bin/ili2gpkg-5.0.1/ili2gpkg-5.0.1.jar --schemaimport --dbfile /home/dave/qgis_projects/metronrepo/bad_false.gpkg --coalesceCatalogueRef --createEnumTabs --createUnique --createFk --createFkIdx --coalesceMultiSurface --coalesceMultiLine --coalesceMultiPoint --coalesceArray --beautifyEnumDispName --createGeomIdx --createMetaInfo --expandMultilingual --createTypeConstraint --createTidCol --importTid --smart2Inheritance --strokeArcs --createBasketCol --defaultSrsAuth EPSG --defaultSrsCode 2056 --preScript NULL --postScript NULL --modeldir https://models.interlis.ch;https://models.opengis.ch;/home/dave/qgis_projects/nope --models Schnittstellenmodell_ARE_AG_LV95 --iliMetaAttrs NULL --metaConfig ilidata:metaconfig_topping_project_ini_001

image

[ch.ehi.ili2db]
smart2Inheritance = True
createNumChecks = True

we set it here:

java -jar /home/dave/dev/opengisch/QgisModelBaker/QgisModelBaker/libs/modelbaker/iliwrapper/bin/ili2gpkg-5.0.1/ili2gpkg-5.0.1.jar --schemaimport --dbfile /home/dave/qgis_projects/metronrepo/good.gpkg --coalesceCatalogueRef --createEnumTabs --createUnique --createFk --createFkIdx --coalesceMultiSurface --coalesceMultiLine --coalesceMultiPoint --coalesceArray --beautifyEnumDispName --createGeomIdx --createMetaInfo --expandMultilingual --createTypeConstraint --createEnumTabsWithId --createTidCol --importTid --smart2Inheritance --strokeArcs --createBasketCol --defaultSrsAuth EPSG --defaultSrsCode 2056 --preScript NULL --postScript NULL --modeldir https://models.interlis.ch;https://models.opengis.ch;/home/dave/qgis_projects/nope --models Schnittstellenmodell_ARE_AG_LV95 --iliMetaAttrs NULL --metaConfig ilidata:metaconfig_topping_project_ini_001

image

Manually set args in the command (what Model Baker passes) overrides the Meta Config. This is good, but in this case the createEnumTabsWithId is overridden by the "manually" set --createEnumTabs.

It's a little bit like we would pass --smart1inheritance even when the meta config smart2inheritance: ili2db parses (apparently) first the metaconfig and overrides these settings by the arguments...

Now we need to disable createEnumTabs as well when createEnumTabsWithId is set in the metaconfig (and the other way around).

signedav commented 7 months ago

Why do we set createEnumTabs at all?