mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: edge schema with custom ids (#2742)
Fixed https://github.com/ent/ent/issues/2740 Fixed https://github.com/ent/ent/issues/2741
This commit is contained in:
@@ -335,7 +335,7 @@ func (u *{{ $upsertBulk }}) UpdateNewValues() *{{ $upsertBulk }} {
|
||||
{{- if or $udfID $.ImmutableFields }}
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
|
||||
for _, b := range u.create.builders {
|
||||
{{- if $.ID.UserDefined }}
|
||||
{{- if $udfID }}
|
||||
if _, exists := b.mutation.ID(); exists {
|
||||
s.SetIgnore({{ $.Package }}.{{ $.ID.Constant }})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user