withGroup sets the old Group of the mutation.
(node *Group)
| 3959 | |
| 3960 | // withGroup sets the old Group of the mutation. |
| 3961 | func withGroup(node *Group) groupOption { |
| 3962 | return func(m *GroupMutation) { |
| 3963 | m.oldValue = func(context.Context) (*Group, error) { |
| 3964 | return node, nil |
| 3965 | } |
| 3966 | m.id = &node.ID |
| 3967 | } |
| 3968 | } |
| 3969 | |
| 3970 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 3971 | // executed in a transaction (ent.Tx), a transactional client is returned. |