check runs all checks and user-defined validators on the builder.
()
| 216 | |
| 217 | // check runs all checks and user-defined validators on the builder. |
| 218 | func (_u *GroupUpdate) check() error { |
| 219 | if v, ok := _u.mutation.Name(); ok { |
| 220 | if err := group.NameValidator(v); err != nil { |
| 221 | return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Group.name": %w`, err)} |
| 222 | } |
| 223 | } |
| 224 | if _u.mutation.OrganizationCleared() && len(_u.mutation.OrganizationIDs()) > 0 { |
| 225 | return errors.New(`ent: clearing a required unique edge "Group.organization"`) |
| 226 | } |
| 227 | return nil |
| 228 | } |
| 229 | |
| 230 | // Modify adds a statement modifier for attaching custom logic to the UPDATE statement. |
| 231 | func (_u *GroupUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GroupUpdate { |
no test coverage detected