withProject sets the old Project of the mutation.
(node *Project)
| 10931 | |
| 10932 | // withProject sets the old Project of the mutation. |
| 10933 | func withProject(node *Project) projectOption { |
| 10934 | return func(m *ProjectMutation) { |
| 10935 | m.oldValue = func(context.Context) (*Project, error) { |
| 10936 | return node, nil |
| 10937 | } |
| 10938 | m.id = &node.ID |
| 10939 | } |
| 10940 | } |
| 10941 | |
| 10942 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 10943 | // executed in a transaction (ent.Tx), a transactional client is returned. |