MerginMaps / MerginMaps/mobile
Support for PostgreSQL Arrays is missing for Value Relation multiple selection
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
Using a Value Relation Widget with the option Allow multiple selections works both in QGIS Desktop and Mergin maps app, in a PostgreSQL table as long as the field type is a varchar with enough size for storing a list of values separated by commas.
On the other hand, QGIS Desktop also works fine if the field column is an array of values, like a _varchar.
Mergin maps app doesn't seem to be ready for it yet. Although it looks good in the interface, showing all possible values and even showing previous selections, once you modify a value and save it, the database "stores" a NULL value instead of the selected values.
On PostgreSQL side, having an array allows better management of the list of values, powered by a good set of functions, so I think it would be interesting to be supported also by mergin maps.
Thanks for all your work!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a Value Relation Widget, multiple selections enabled, and a PostgreSQL array column, comparing behavior before and after saving in Mergin Maps. Trace the mobile app's value serialization and save path for array fields. Done means selected values persist instead of being stored as NULL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100