You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to do the following and have .Armor be set if the join succeeds, and set to nil if the join doesn't match. At the moment I'm having to set all the .Armor columns to nullable types to make it work.
Is this already possible and I'm just "doing it wrong"? or do I need to add a PR to make a feature for this?
typeUserstruct {
IDintArmor*Armor
}
typeArmorstruct {
Namestring
}
usr:=&User{}
db.Get(usr, `select user.id "user.id", armor.name "armor.name" from user left join armor on armor.user = user.id where user.id = 1`)
The text was updated successfully, but these errors were encountered:
I'd like to do the following and have
.Armor
be set if the join succeeds, and set to nil if the join doesn't match. At the moment I'm having to set all the.Armor
columns to nullable types to make it work.Is this already possible and I'm just "doing it wrong"? or do I need to add a PR to make a feature for this?
The text was updated successfully, but these errors were encountered: