I have a Relation defined in my items.xml which is not explicitly marked as abstract. Both the source and target elements of the relation are also non abstract.
I then used the "Redeclaring Relations" by making the relation concrete in subclasses as defined in https://help.hybris.com/6.1.0/hcd/8c755da8866910149c27ec908fc577ef.html
This works fine for performance and validations however the following unfortunate and weird situation arises:
For some reason the relation is marked as abstract (I just realized the relations in question are of type one-to-many or many-to-one and do not have their own deployment tables. Could this be the reason?)
There is no way to search for instances of the Relation in hmc or backoffice.
Also it is impossible to search for the instances using Flexible search. it throws an exception:
Exception message: parsed type --(Relation Name Here)-- is abstract
Exception stacktrace: de.hybris.platform.persistence.flexiblesearch.ParsedType.getTypeRestrictionConditions(ParsedType.java:720) de.hybris.platform.persistence.flexiblesearch.ParsedQuery.collectTranslatedRestrictions(ParsedQuery.java:596) de.hybris.platform.persistence.flexiblesearch.ParsedQuery.assemble(ParsedQuery.java:543) de.hybris.platform.persistence.flexiblesearch.ParsedQuery.translate(ParsedQuery.java:432) de.hybris.platform.persistence.flexiblesearch.ParsedQuery.getTranslatedQuery(ParsedQuery.java:179) de.hybris.platform.persistence.flexiblesearch.QueryParser.translateQuery(QueryParser.java:227) de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.translate(FlexibleSearch.java:1998)
I am looking for experts to please:
Confirm if this behavior of marking the Relation abstract is correct? (I think this is a bug)
Share how to get around this issue