Adding a "Referral_ID" foreign key to a different user record

I want to add a field to my user model that would be a referral ID, and would be a foreign key to a separate user, default value of null, and set to null on delete. Is this possible, having a foreign key to other records in the same class? If so, how would the foreign key be configured? I am having a hard time wrapping my head around how this would work, or even how to word a search to research myself. :slight_smile:

Thanks in advance,

This is actually a fairly common technique, used under a number of different circumstances. It’s covered in the ForeignKey field docs.

Ahh, I see it now. I guess I didn’t ready far enough into the documentation to find the example of one to one relations and the related_name property.

Thanks for pointing me in the right direction.