Main feature of this release is all about OIDs, a pain point that has existed for quite some time. First thing is the OIDs generated for the single objects, means the TID (or t_ili_tid in the physical database) what is done with default value expressions. The second thing is the OIDs generated for basket-objects, means the BID (and as well t_ili_tid in the physical database), when creating baskets, what now can be controlled by the user as well.
Improvements
TID (OID) Generation for Objects
Often the models definition requires a cross-system unique identificator. The so called OID.
Model Baker detects the OID domain (like `UUIDOID`, `I32OID`, `STANDARDOID`, `ANYOID` or user defined OID) and suggests default value expressions used in the `t_ili_tid` fields.
Since the user have to be able to edit those values, they are provided in the GUI.
See [documentation](https://opengisch.github.io/QgisModelBaker/background_info/oid_tid_generator/)
In the wizard
There is an additional page after the generation of the QGIS project.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/9a4beb61-ebfa-43fe-beab-5e9ebb1c333d)
You can use the QGIS Expression Dialog to edit the default value expression for the `t_ili_tid` field of each layer.
See [documentation](https://opengisch.github.io/QgisModelBaker/user_guide/import_workflow/#tid-oid-values)
On existing projects
Find the **TID (OID) Manager** via the *Database > Model Baker* menu.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/fc7902b8-1f4f-4cef-96be-e7b8115821ae)
If you need a counter in the expressions, you can use the `t_id` field, that has a schema-wide sequence counting up. This sequence can be reset as well by the user, but be carefull not to set it lower than already existing `t_id`s in your project.
Sponsors
This feature has been financed in a crowdfunding project by [geostandards.ch](https://geostandards.ch/), [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html) and the QGIS Model Baker Group
Basket Generation with BID (OID)
In case you create a new dataset (e.g. the `Baseset` that is created by Model Baker automatically) and you want to collect ***fresh*** data in QGIS (no import of existing data), the baskets have to be created as well.
Here the `BID` definition needs to be considered.
In the wizard
There is an additional page after the schema import when the `Baseset` is created.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/8a68d207-a4ee-431e-b764-2abd9c1b5f3c)
Reasonable BIDs are suggested, but of course some of them (like `STANDARDOID`) need editing by the user.
As well Model Baker suggests what baskets should be created or not (it sees it as relevant in case it's not extended by other topics).
See [documentation](https://opengisch.github.io/QgisModelBaker/user_guide/import_workflow/#create-baskets)
In the Dataset Manager
Of course you might want to create additional Datasets and with it the Baskets. Here is a new option *Manage baskets of selected dataset* to create the baskets you want.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/e0534984-4d0d-4054-a8ab-7e6c734200b8)
See [documentation](https://opengisch.github.io/QgisModelBaker/background_info/basket_handling/#creation-of-baskets)
Sponsors
This feature has been financed in a crowdfunding project by [geostandards.ch](https://geostandards.ch/), [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html) and the QGIS Model Baker Group
Schema section in drop down
On PostgreSQL connections you are now able to select your schema.
![Screenshot from 2023-11-24 13-12-40](https://github.com/opengisch/QgisModelBaker/assets/28384354/5fa3e3f8-2525-4da8-a71e-a9b47fc9faf8)
Sponsors
This feature has been financed by the [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html)
ili2db