claeis / ili2db

interlis import/export to relational databases
30 stars 30 forks source link

References with INTERLIS.UUIDOID are case sensitive, but shouldn't be? #507

Closed romefi closed 1 year ago

romefi commented 1 year ago

Being aware that there is no "uppercase" or "lowercase" with UUID, it still seems to be a kind of an issue.

e.g.

Error: unknown referenced object LWB_Landwirtschaftliche_Zonengrenzen_Kataloge_V2_0.LZ_Kataloge.LZ_Katalog_Typ TID 9BC0D7E7-2370-102F-9D28-D23EBF06DE46 referenced from LWB_Bewirtschaftungseinheiten_V2_0.Landw_Betrieb.BE_Bewirtschaftungseinheit TID 2B176128-B7E9-4642-AA0A-0E54C02DAFA9

In my opinion, Postgres shouldn't care, if the UUID is upper- or lowercase.

Is this a bug or am I missing something?

beistehen commented 1 year ago

According to the following lines of code, UUID are valid in both upper and lower (and mixed) case:

https://github.com/claeis/iox-ili/blob/fa4dfacf3efa9b947712fe0b10f5bfc030ec9c70/src/main/java/ch/interlis/iox_j/validator/Validator.java#L4500-L4501

So I guess it is a comparison issue, where UUIDs are not treated as equal if the case is not exactly the same - looks like a bug.

I suggest to look into this topic for INTERLIS.STANDARDOID as well...

romefi commented 1 year ago

@claeis is this a bug and if yes, when will it be fixed?

We can't import data produced on SQL Server in Postgres because of this issue, which is quite critical.

Thanks.

claeis commented 1 year ago

two bugs