QueryAllowlist queries the allowlist edge of a AllowListItem.
(_m *AllowListItem)
| 743 | |
| 744 | // QueryAllowlist queries the allowlist edge of a AllowListItem. |
| 745 | func (c *AllowListItemClient) QueryAllowlist(_m *AllowListItem) *AllowListQuery { |
| 746 | query := (&AllowListClient{config: c.config}).Query() |
| 747 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 748 | id := _m.ID |
| 749 | step := sqlgraph.NewStep( |
| 750 | sqlgraph.From(allowlistitem.Table, allowlistitem.FieldID, id), |
| 751 | sqlgraph.To(allowlist.Table, allowlist.FieldID), |
| 752 | sqlgraph.Edge(sqlgraph.M2M, true, allowlistitem.AllowlistTable, allowlistitem.AllowlistPrimaryKey...), |
| 753 | ) |
| 754 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 755 | return fromV, nil |
| 756 | } |
| 757 | return query |
| 758 | } |
| 759 | |
| 760 | // Hooks returns the client hooks. |
| 761 | func (c *AllowListItemClient) Hooks() []Hook { |