sourceFields = ((AggregateCollectionMapping)mapping).getSourceKeyFields();
targetFields = ((AggregateCollectionMapping)mapping).getTargetForeignKeyFields();
}
} else if (mapping.isManyToManyMapping()) {
if (shouldBuildDeleteStatementForMapping((ManyToManyMapping)mapping, dontCheckDescriptor, descriptor)) {
RelationTableMechanism relationTableMechanism = ((ManyToManyMapping)mapping).getRelationTableMechanism();
sourceFields = relationTableMechanism.getSourceKeyFields();
targetFields = relationTableMechanism.getSourceRelationKeyFields();
}
} else if (mapping.isOneToOneMapping()) {
RelationTableMechanism relationTableMechanism = ((OneToOneMapping)mapping).getRelationTableMechanism();
if (relationTableMechanism != null) {
if (shouldBuildDeleteStatementForMapping((OneToOneMapping)mapping, dontCheckDescriptor, descriptor)) {
sourceFields = relationTableMechanism.getSourceKeyFields();
targetFields = relationTableMechanism.getSourceRelationKeyFields();
}
}
}
if (sourceFields != null) {
deleteStatements.add(buildDeleteAllStatementForMapping(selectCallForExist, selectStatementForExist, sourceFields, targetFields));