// AddPosts adds related model Posts and matches to given Blog.
AddPosts adds related model Posts and matches to given Blog.
// AddPosts adds related model Posts and matches to given Blog .
func (b *blogsQueryBuilder) AddPosts(_posts ...*Post) error {
	if b.err != nil {
		return b.err
	}
	relation, err := NRN_Blogs.Model.RelationByIndex(3)
	if err != nil {
		return errors.Wrapf(mapping.ErrInternal, "getting 'Posts' relation by index for model 'Blog' failed: %v", err)
	}
	models := make([]mapping.Model, len(_posts))
	for i := range _posts {
		models[i] = _posts[i]
	}
	return b.builder.AddRelations(relation, models...)
}
func ( b * blogsQueryBuilder ) AddPosts ( _posts ... * Post ) error { if b . err != nil { return b . err } relation , err := NRN_Blogs . Model . RelationByIndex ( 3 ) if err != nil { return errors . Wrapf ( mapping . ErrInternal , " " , err ) } models := make ( [ ] mapping . Model , len ( _posts ) ) for i := range _posts { models [ i ] = _posts [ i ] } return b . builder . AddRelations ( relation , models ... ) }
AddPosts adds related model Posts and matches to given Blog.
AddPosts adds related model Posts and matches to given Blog .