private void collectTargetDbLocationAndStructureLink(Target tgt) {
DataStructure output = transformation.getOutputStructure();
DataLocation loc = tgt.getLocation();
dbStructureAndLocationSanityCheck(output, loc, "output");
DatabaseLocation dbLoc = (DatabaseLocation) loc;
DatabaseStructure dbStruct = (DatabaseStructure) output;
dbStruct.setDbLocation(dbLoc);
// HACK: This is part of a hack described in more detail in the DatabaseStructure class:
dbStruct.setTargetId(tgt.getID());
}