Hello,
Is it possible to use a spel expression for a canonical primary key. Example:
<attribute>
<name>XXYY</name>
<model>
<type>String</type>
<primaryKey>true</primaryKey>
</model>
<transformations>
<transformation>
<rawSource>RawXXXItem</rawSource>
<expression spel="true">T(org.apache.commons.lang3.StringUtils).equals(getField('YYY'), 'TTTT') ?
getField(XXX) : 'EMPTY'</expression>
</transformation>
</transformations>
</attribute>
Does not seem to be possible to combine both expression = spel and primaryKey. Correct?
Getting exception:
Exception org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'XXX' cannot be found on object of type 'com.hybris.datahub.model.RawItem'
The actual rawItem:
<type>RawXXXItem</type>
<attributes>
<attribute>
<name>YYY</name>
</attribute>
<attribute>
<name>XXX</name>
</attribute>
<attribute>
<name>ZZZZ</name>
</attribute>
</attributes>
</item>
Best Regards