// SetBlog sets related model Blog and matches to given Post.
SetBlog sets related model Blog and matches to given Post.
// SetBlog sets related model Blog and matches to given Post .
func (p *postsQueryBuilder) SetBlog(_blog *Blog) error {
	if p.err != nil {
		return p.err
	}
	relation, err := NRN_Posts.Model.RelationByIndex(4)
	if err != nil {
		return errors.Wrapf(mapping.ErrInternal, "getting 'Blog' relation by index for model 'Post' failed: %v", err)
	}
	return p.builder.SetRelations(relation, _blog)
}
func ( p * postsQueryBuilder ) SetBlog ( _blog * Blog ) error { if p . err != nil { return p . err } relation , err := NRN_Posts . Model . RelationByIndex ( 4 ) if err != nil { return errors . Wrapf ( mapping . ErrInternal , " " , err ) } return p . builder . SetRelations ( relation , _blog ) }
SetBlog sets related model Blog and matches to given Post.
SetBlog sets related model Blog and matches to given Post .