[feature/backend] add categories param in posts
This commit is contained in:
parent
958e3c2886
commit
be8bf22017
21 changed files with 448 additions and 281 deletions
|
@ -173,7 +173,7 @@ func HasPosts() predicate.Category {
|
|||
return predicate.Category(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn),
|
||||
sqlgraph.Edge(sqlgraph.M2M, false, PostsTable, PostsPrimaryKey...),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue