enhancement
critical
major
minor
minor
major
#25598
NPE in TL-Sync when sending overwritten attributes whose definition is not exported.
There is a type T1 with an attribute A`, and a derived type `T2 with an override of A*. T1 is not annotated as exported. T2 is annotated as exported.
Error
When sending a T2, a NullPointerException occurs in `ModelBasedExportConfiguration.getAttributeName(ObjectKey)`. The cause is that there is no entry in the map `ModelBasedExportConfiguration._attributeIdToName ` for the ` ObjectKey` representing the attribute `T1#A `. This is because neither the type `T1 ` nor the attribute `A` is annotated as "exported." Only the derived class `T2 ` and its attribute A* are annotated as such. However, T2#A* is not queried because the database always uses only the definition of an attribute, even if the attribute has been overridden.
Noticed this in EPP. There are abstract supertypes there, some of whose derivations are exported and others imported. Therefore, the supertypes cannot be annotated as either “exported” or “imported.”
Code Migration
Value mappings must be moved to the definition of their attribute—that is, to the original definition. For technical reasons, value mappings are not found in attribute overrides. Changing this would be too time-consuming.
Test
test.com.top_logic.kafka.services.TestTLSyncAnnotationInheritance