我能够使用以下语法预加载与Order相关的所有Order:Preload("Guests").是否可以根据Guests表中列上的条件预加载Order?order_id IN (1)) AND (some_column_in_guest_tbl = some_column_in_order_tbl)我知道这种预加载语法(它不接受order表列的值,只有在我自己提供值的情况下才能起作用
我有两个表,我希望从中获取in,并需要另一个字段,该字段将告诉我连接表中的条目是何时创建的。is可以正常显示,但"created_at“没有更新,显示的是”空“而不是”时间“。// this is the table join struct which I want to make gorm.JoinTableHandlerUserID int}
f
下面是我的结构 ID int64 Name string Father FaterModel `gorm:"foreignKey:ID;references:GrandID"` ID int64}
在原始sql中,我想要的是son.father_id where (son.name like '%name%' or