// SetPost sets related model Post and matches to given Comment.
SetPost sets related model Post and matches to given Comment.
// SetPost sets related model Post and matches to given Comment .
func (c *commentsQueryBuilder) SetPost(_post *Post) error {
	if c.err != nil {
		return c.err
	}
	relation, err := NRN_Comments.Model.RelationByIndex(2)
	if err != nil {
		return errors.Wrapf(mapping.ErrInternal, "getting 'Post' relation by index for model 'Comment' failed: %v", err)
	}
	return c.builder.SetRelations(relation, _post)
}
func ( c * commentsQueryBuilder ) SetPost ( _post * Post ) error { if c . err != nil { return c . err } relation , err := NRN_Comments . Model . RelationByIndex ( 2 ) if err != nil { return errors . Wrapf ( mapping . ErrInternal , " " , err ) } return c . builder . SetRelations ( relation , _post ) }
SetPost sets related model Post and matches to given Comment.
SetPost sets related model Post and matches to given Comment .