Closed gaiottino closed 5 years ago
Creating relationships in sqlboiler is not done by using sqlboiler. It's simply done by creating the appropriate constructs in your database.
One-to-one relationships are created by having two tables related with a foreign key on one of the tables that also happens to be unique. Once you've done that, regenerate your models and sqlboiler should support the use case.
Thanks alot. Worked.
Hi,
I've been searching for an example but unable to find one. The README does not show an example and the wiki is incomplete. How to I create a One-To-One relationship between Users and APIKeys? So that I can do
user.APIKey
andapiKey.user
?Thanks,