on-internet
← Community

Should I use belongsTo or hasOne?

Stack Overflow ·

Consider two models A and B A -> relatedTo B is a one-to-one relationship. What is the difference in using (A ->hasOne – B) and (A ->belongsTo – B)? Can I use them interchangeably?

Comments

Sign in or sign up to comment and upvote.

No comments yet.