Open txau opened 3 years ago
This requires extensive discussion as to how to approach this.
cc @txau @daneryl @fnocetti
The first advance on this was implemented in Relationships V2 which implied indexing inherited properties with the mapping of the property it inherits. There's still a long road to walk including, but not only, reconsidering how equally named properties are handled.
@fnocetti keep in mind we already have a policy for this. Same name + same type = same property. You can't have same name with different types, and I think it is a good solution to make sure the way users name properties in their database is unique. I guess you are already aware of this.
The question is how to handle inherited properties to be able to be indexed and treated as the same name + type as the property they are inheriting.
@txau I'm aware of it, and it's in general a good solution. I think the change of concept we need to make is that a filter is not for one property, but for compatible properties, in the sense of same name + (same type or inherited type) = compatible properties
. Together with that, two properties can be called the same if they are compatible, that doesn't make them the same property
.
We need to work in the concept.
This will happen as a byproduct of Relationships V2
If an inherited property has the same name and type as another not inherited property, Uwazi detects it as an invalid template configuration. See image:
(note: there is also a bug as seen in the image where the whole name of the property is not being displayed and it reads only "Date". This will be reported in another issue).
Ideally we can have duplicate names and filter them together. In the case of the example: