Bugfix
Critical
#28519
Incorrect preload for attributes whose values are stored in the target table
A reference-value attribute can be configured so that the values are saved in the target table. If this target table is not monomorphic, the preload is incorrect:
Analysis
Let ref:A -> B be a reference from A` to `B and there are extensions B1 and B2 which are stored in tables with the same name. ref is stored in the row table, i.e. there is a column ref in B1 and B2 in which the ID of A is stored.
If a preload is now made with several A's, `B's are searched for and found in `B1 and `B2`, but these are not returned correctly sorted, so that the caches are filled incorrectly.