{
AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit();
String targetName = _fieldType.getName();
ManyToOneField manyToOneField;
manyToOneField = new ManyToOneField(_sourceType, _fieldName, getCascade(), true);
EntityType targetType = persistenceUnit.createEntity(getTargetEntity());
manyToOneField.setType(targetType);
manyToOneField.setLazy(isFetchLazy());
if (_joinColumnMap.size() > 0)
manyToOneField.setJoinColumnMap(_joinColumnMap);
_sourceType.addField(manyToOneField);
// jpa/0ge3
if (_sourceType instanceof MappedSuperclassType)
return;
if (_joinColumnMap.size() > 0)
validateJoinColumns(_field, _fieldName, _joinColumnMap, targetType);
manyToOneField.init();
}