@hasOne
(one-to-one)@hasMany
(one-to-many)@belongsTo
(one-to-one)@manyToMany
(many-to-many)car_id
, and the foreign key defaults to id
. You can manually override these:JOIN
s, so that even complex relationships can be fetched using just one query, rather than multiple.