if (("one".equals(modelRelation.getType()) || "one-nofk".equals(modelRelation.getType())) && !modelRelation.isAutoRelation()) {
ModelEntity relatedEnt = null;
try {
relatedEnt = this.getModelEntity(modelRelation.getRelEntityName());
} catch (GenericModelException e) {
throw new GenericModelException("Error getting related entity [" + modelRelation.getRelEntityName() + "] definition from entity [" + curEntityName + "]", e);
}
if (relatedEnt != null) {
// don't do relationship to the same entity, unless title is "Parent", then do a "Child" automatically
String targetTitle = modelRelation.getTitle();
if (curModelEntity.getEntityName().equals(relatedEnt.getEntityName()) && "Parent".equals(targetTitle)) {