AddFile adds the "file" edges to the File entity.
(f ...*File)
| 149 | |
| 150 | // AddFile adds the "file" edges to the File entity. |
| 151 | func (ec *EntityCreate) AddFile(f ...*File) *EntityCreate { |
| 152 | ids := make([]int, len(f)) |
| 153 | for i := range f { |
| 154 | ids[i] = f[i].ID |
| 155 | } |
| 156 | return ec.AddFileIDs(ids...) |
| 157 | } |
| 158 | |
| 159 | // SetUserID sets the "user" edge to the User entity by ID. |
| 160 | func (ec *EntityCreate) SetUserID(id int) *EntityCreate { |
no test coverage detected