private void addDependentOneToOne()
{
AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit();
EntityType targetType = persistenceUnit.createEntity(getTargetEntity());
// Owner
ManyToOneField sourceField
= getSourceField(targetType, _mappedBy, _sourceType);
if (sourceField == null) {
throw error(_field, L.l("OneToOne target '{0}' does not have a matching ManyToOne relation.",
targetType.getName()));
}
DependentEntityOneToOneField oneToOne;
oneToOne = new DependentEntityOneToOneField(_sourceType, _fieldName, getCascade());