[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
|
@ -201,10 +201,10 @@ func (cc *CategoryCreate) createSpec() (*Category, *sqlgraph.CreateSpec) {
|
|||
}
|
||||
if nodes := cc.mutation.PostsIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Rel: sqlgraph.M2M,
|
||||
Inverse: false,
|
||||
Table: category.PostsTable,
|
||||
Columns: []string{category.PostsColumn},
|
||||
Columns: category.PostsPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(post.FieldID, field.TypeInt),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue