Weird belongsTo() relationship?


#1

Suppose we have a Profile model in which we define belongsTo() relationship to theUser model. The documentation says this will lead us to define our databases this way:

Is not it a bad design that the column id in users table is a foreign key referencing profiles tables instead of being the primary key of users table?

Billal Begueradj


#2

Thought the same thing the very first time i saw it. I think if anything it should have been the other way round. Perhaps there might be some reason for that.


#3

@virk Could you please confirm the diagram above has 2 typos or not?