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
Sharding must have a shard key, and you must present the shard key in every query conditions. If we not providing that, the Sharding implementation can not know which sub table to query.
GORM Playground Link
go-gorm/playground#1
Description
When i use preload on sharding table, the return "msg sharding key or id required, and use operator ="
type A struct {
ID string
BS []B
}
type B struct {
ID string
AID string
}
var aModel A
db.Model(&A{}).Preload("B").Find(&aModel)
The text was updated successfully, but these errors were encountered: