So I am new to GORM and I have this task where I have two tables accounts and users
I get the user.Id and I need to get the accountId from the user table afterwards I need to only get the account that has the same Id as user.AccountId
type User struct{
Id int
AccountId int
}
type Account struct{
Id int
Balance int
}
It looks like this should be a pretty simple call to do it in a single request, but I can't find a simple implementation for this logic. Can anyone help me