updated deps & regen ent

This commit is contained in:
2023-05-16 18:09:10 +02:00
parent e9e3e02a39
commit 3fd0a4204b
53 changed files with 1062 additions and 593 deletions

View File

@@ -198,7 +198,7 @@ func (mc *MatchCreate) Mutation() *MatchMutation {
// Save creates the Match in the database.
func (mc *MatchCreate) Save(ctx context.Context) (*Match, error) {
mc.defaults()
return withHooks[*Match, MatchMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks)
return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks)
}
// SaveX calls Save and panics if Save returns an error.
@@ -367,10 +367,7 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
Columns: []string{match.StatsColumn},
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Column: matchplayer.FieldID,
},
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
},
}
for _, k := range nodes {
@@ -386,10 +383,7 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
Columns: match.PlayersPrimaryKey,
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeUint64,
Column: player.FieldID,
},
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
},
}
for _, k := range nodes {
@@ -424,8 +418,8 @@ func (mcb *MatchCreateBulk) Save(ctx context.Context) ([]*Match, error) {
return nil, err
}
builder.mutation = mutation
nodes[i], specs[i] = builder.createSpec()
var err error
nodes[i], specs[i] = builder.createSpec()
if i < len(mutators)-1 {
_, err = mutators[i+1].Mutate(root, mcb.builders[i+1].mutation)
} else {