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
type Post struct {
Id int
Title string
User *User orm:"rel(fk)"
Tags []*Tag orm:"rel(m2m)"
}
type Tag struct {
Id int
Name string
Posts []*Post orm:"reverse(many)"
}
var posts []*Post
num, err := dORM.QueryTable("post").Filter("Tags__Tag__Name", "golang").All(&posts)
像这样的查询,都是inner join 连接的,如果能用left join 连接呢
The text was updated successfully, but these errors were encountered:
type Post struct {
Id int
Title string
User *User
orm:"rel(fk)"
Tags []*Tag
orm:"rel(m2m)"
}
type Tag struct {
Id int
Name string
Posts []*Post
orm:"reverse(many)"
}
var posts []*Post
num, err := dORM.QueryTable("post").Filter("Tags__Tag__Name", "golang").All(&posts)
像这样的查询,都是inner join 连接的,如果能用left join 连接呢
The text was updated successfully, but these errors were encountered: