Object item = ActiveRecordBase.findFirst(hasOneField.getTargetType(), hasOneField.getForeignKey()+"=?", new Object[]{idValue}, hasOneField.getAnnotation().order());
OrmInfo.setFieldValue(clasz, fieldName, obj, item);
}
}
BelongsToField belongsToField = orm.getBelongsToField(fieldName);
if (belongsToField != null){
if (OrmInfo.getFieldValue(clasz, fieldName, obj) == null){
Object fkValue = OrmInfo.getFieldValue(clasz, belongsToField.getForeignKey(), obj);
Object item = ActiveRecordBase.find(belongsToField.getTargetType(), fkValue);
OrmInfo.setFieldValue(clasz, fieldName, obj, item);
}
}
}