Open vitalz opened 6 years ago
There is a workaround to implement your custom Mapper and it will match (pre-selected in memory) targets for incoming sources at @AfterTargetsMatched.
.matchBy(new CustomMapper())
ObjectSelect.query(Custom.class).select(
segment.getContext()
)
There is an idea that:
mapper.keyForTarget(customObj) === mapper.keyForSource(incomingSource)
@AfterTargetsMatched
public void AfterTargetsMatched(Execution exec, CreateOrUpdateSegment<Custom> segment) {
// some code
segment.setMatchedTargets(customTargets);
}
Database SQL:
Cayenne model:
LinkMove match by:
There is Source ID is being encrypted column.
During targets being matched to sources process, at TargetMatcher.match(ObjectContext, Map<Object, Map<String, Object>>) no targets are being obtained:
Though the according target is existing LinkMove will produce a duplicate.