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
typeTable1struct {
tableName models.TableName`pg:"table1"`IDstring`pg:"id,pk"`Table2IDstring`pg:"table2_id,notnull"`...Table2*Table2`pg:"rel:has-one"`Table3*Table3`pg:"rel:has-one"`// can be has-many
}
My results return the records in Table1 and Table2, but not Table3 (Table3 field is nil). How do I go about correctly deserializing the results into the associated structs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following tables:
And the following query:
My results return the records in Table1 and Table2, but not Table3 (Table3 field is nil). How do I go about correctly deserializing the results into the associated structs?
Beta Was this translation helpful? Give feedback.
All reactions