QueryOwner queries the owner edge of a Meta.
(_m *Meta)
| 1738 | |
| 1739 | // QueryOwner queries the owner edge of a Meta. |
| 1740 | func (c *MetaClient) QueryOwner(_m *Meta) *AlertQuery { |
| 1741 | query := (&AlertClient{config: c.config}).Query() |
| 1742 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 1743 | id := _m.ID |
| 1744 | step := sqlgraph.NewStep( |
| 1745 | sqlgraph.From(meta.Table, meta.FieldID, id), |
| 1746 | sqlgraph.To(alert.Table, alert.FieldID), |
| 1747 | sqlgraph.Edge(sqlgraph.M2O, true, meta.OwnerTable, meta.OwnerColumn), |
| 1748 | ) |
| 1749 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 1750 | return fromV, nil |
| 1751 | } |
| 1752 | return query |
| 1753 | } |
| 1754 | |
| 1755 | // Hooks returns the client hooks. |
| 1756 | func (c *MetaClient) Hooks() []Hook { |