AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
(s ...*StoragePolicy)
| 147 | |
| 148 | // AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity. |
| 149 | func (nc *NodeCreate) AddStoragePolicy(s ...*StoragePolicy) *NodeCreate { |
| 150 | ids := make([]int, len(s)) |
| 151 | for i := range s { |
| 152 | ids[i] = s[i].ID |
| 153 | } |
| 154 | return nc.AddStoragePolicyIDs(ids...) |
| 155 | } |
| 156 | |
| 157 | // Mutation returns the NodeMutation object of the builder. |
| 158 | func (nc *NodeCreate) Mutation() *NodeMutation { |
nothing calls this directly
no test coverage detected