The difference between the two is where the foreign key will be in the database. The belongsTo function must belong to the model whose table contains the foreign key, and hasOne must belong to the model referred to by the foreign key from another table.
Both will work, but you must support robust coding techniques for other developers who may use your system in the future. In addition, it becomes crucial if your foreign key cascades deletion. If you delete model1, should model2, which belongs to model1, also be deleted?
Mikel bitson
source share