MerginMaps/server

Unique value validation

CharlesGag opened this issue · 2 comments

Hello,

I'm having a weird issue with a project. I made a public project called validation_test for you.

Here is the step to reproduce the issue :

1 - Add a new point with the "regard" layer.
2 - Just add a number in the "point" column and choose any type in the next row.
3- This is where it gets interesting. I have 2 relations with that layer. Pictures (photographies) and lines (Conduites). Without saving, add any of these 2 things and save. After then, you won't be able to save, you will get a message saying "point" value must be unique.
4- Just delete the number and re-enter the exact same. You will then be able to save (?).

There is another way to recreate this. Just create a regard point and then save after

entering a number and a type. Don't do anything else. Then, try to edit this point. You will need to delete it and re-enter the same number again before being able to save.

Note that after you did that, this issue is "fixed" and it won't happen again for this # .

I attached the QGIS project as well, in case I messed up somewhere.

Thank you

Public.zip

Hi @CharlesGag , this is not a bug in mergin server (this repository on GitHub), but rather QGIS mergin plugin. Therefore I closing the issue here.

I think you may have misconfigured project, you cannot use FID for foreign key , but only UUID. Have you seen the documentation https://merginmaps.com/docs/layer/attach-multiple-photos-to-features/ ?

Wrong location my bad, but thanks for the anwer :) . Yes I am using a UUID as PK, this field is just for numbering purpose.