UUID's #5243
-
hi all. I'm currently creating a new project for field data collection with qfield.cloud offline edeting, using postgis tables. I want to use uuid's as primary fields and on the provider side use the DEFAULT gen_random_uuid(). But when the project is packaged to a geopackage in qfield, the default values are not copied. I could set this in the widget to uuid generator. But these uuid's have brackets. So when I push the collected field data back to the database I get an error wich is related to these brackets. So my geometry is synced but the related table not. I read somewhere that the evaluation of the layers is handled in alphabatical order? So at some point the pk of parent uuid without brackets is compared to the fk with brackets in the child tables. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can create UUIDs without brackets by creating a text widget and a default value expression : |
Beta Was this translation helpful? Give feedback.
You can create UUIDs without brackets by creating a text widget and a default value expression :
uuid('WithoutBraces')