When linking a property with a ref to a property with backref, unique is being added to the property with ref, even when it's a one-to-many relationship, i.e. when backref property is an array. This shouldn't happen when the relationship is one-to-many. unique should only be on one-to-one relationships.
When linking a property with a
ref
to a property withbackref
,unique
is being added to the property withref
, even when it's aone-to-many
relationship, i.e. whenbackref
property is an array. This shouldn't happen when the relationship isone-to-many
.unique
should only be onone-to-one
relationships.The code line for this is here: https://github.com/atviriduomenys/spinta/blob/392174aa73ea14acf1a2d3484563038b8db7058b/spinta/types/backref/link.py#L98
After fixing the issue, fix the tests too: https://github.com/atviriduomenys/spinta/blob/863e2b668235780e2f7264d847dc127ea06c7be2/tests/dtypes/test_backref.py#L89