QueryAllowlistItems queries the allowlist_items edge of a AllowList.
(_m *AllowList)
| 594 | |
| 595 | // QueryAllowlistItems queries the allowlist_items edge of a AllowList. |
| 596 | func (c *AllowListClient) QueryAllowlistItems(_m *AllowList) *AllowListItemQuery { |
| 597 | query := (&AllowListItemClient{config: c.config}).Query() |
| 598 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 599 | id := _m.ID |
| 600 | step := sqlgraph.NewStep( |
| 601 | sqlgraph.From(allowlist.Table, allowlist.FieldID, id), |
| 602 | sqlgraph.To(allowlistitem.Table, allowlistitem.FieldID), |
| 603 | sqlgraph.Edge(sqlgraph.M2M, false, allowlist.AllowlistItemsTable, allowlist.AllowlistItemsPrimaryKey...), |
| 604 | ) |
| 605 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 606 | return fromV, nil |
| 607 | } |
| 608 | return query |
| 609 | } |
| 610 | |
| 611 | // Hooks returns the client hooks. |
| 612 | func (c *AllowListClient) Hooks() []Hook { |