public static void attachYamlFieldTypeName(String keyName, DoctrineModelField doctrineModelField, YAMLKeyValue yamlKeyValue) {
if("fields".equals(keyName) || "id".equals(keyName)) {
YAMLKeyValue yamlType = YamlHelper.getYamlKeyValue(yamlKeyValue, "type");
if(yamlType != null && yamlType.getValueText() != null) {
doctrineModelField.setTypeName(yamlType.getValueText());
}
YAMLKeyValue yamlColumn = YamlHelper.getYamlKeyValue(yamlKeyValue, "column");
if(yamlColumn != null) {
doctrineModelField.setColumn(yamlColumn.getValueText());
}
return;
}
if(RELATIONS.contains(keyName.toLowerCase())) {
YAMLKeyValue targetEntity = YamlHelper.getYamlKeyValue(yamlKeyValue, "targetEntity");
if(targetEntity != null) {
doctrineModelField.setRelationType(keyName);
String value = targetEntity.getValueText();
if(value != null) {
doctrineModelField.setRelation(getYamlOrmClass(yamlKeyValue.getContainingFile(), value));
}
}
}