getValidator().throwInvalidMappingEncountered(getJavaClass(), getReferenceClass());
}
Map<DatabaseField, DatabaseField> keys = ownerMapping.getSourceToTargetKeyFields();
for (DatabaseField fkField : keys.keySet()) {
mapping.addTargetForeignKeyField(fkField, keys.get(fkField));
}
// Add the mapping to the descriptor.
m_descriptor.addMapping(mapping);
}