Hi there,
we can reproducibly trigger an error when assigning a property to an object type (via Admin UI) with both a dynamic property script and ‘unique = true’.
Tested combinations:
| Dynamic script | Unique | Result |
|---|---|---|
| no | false | works |
| no | true | works |
| yes | false | works |
| yes | true | fails |
The behavior is independent of the property type/code.
The relevant server error is:
ERROR: insert or update on table “sample_properties” violates foreign key constraint “sample_properties_unique_fk” Detail: Key (stpt_id, is_unique)=(203, f) is not present in table “sample_type_property_types”.
Best,
Stefan