No, the difference depends on where your foreign key is.
In your example, if A has a b_id column, then A belongsTo B.
If B has an a_id column, then A hasOne or hasMany B depending on how many B should have.
No, the difference depends on where your foreign key is.
In your example, if A has a b_id column, then A belongsTo B.
If B has an a_id column, then A hasOne or hasMany B depending on how many B should have.