when the model has_one use class_name or foreign_key, restore use class_name or setting the foreign_key.