Project & ProjectAttachment. The relation in Project model is:ProjectResource class, I am using ProjectAttachment table and not updating the attachment_id in Project table when submitting a create record request, resulting into empty columns in Attachment section above. But if I add attachment_id manually in database, it would fill up the columns in Attachment.hasOne relationship, foreign_key is actually supposed to be parent's id column in child entity, which in my case would be project_id (or no need to mention as you said). I thought I would only need the project_id column in belongsTo relation because it would save me a column. Now I removed attachment_id because its no longer in use.