func (o *TagI18n) User(exec boil.Executor, mods ...qm.QueryMod) userQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.UserID),
	}
	queryMods = append(queryMods, mods...)
	query := Users(exec, queryMods...)
	queries.SetFrom(query.Query, "\"users\"")
	return query
}
User pointed to by the foreign key.
package mdbmodels
import (
	"bytes"
	"database/sql"
	"fmt"
	"reflect"
	"strings"
	"sync"
	"time"
	"github.com/Bnei-Baruch/sqlboiler/boil"
	"github.com/Bnei-Baruch/sqlboiler/queries"
	"github.com/Bnei-Baruch/sqlboiler/queries/qm"
	"github.com/Bnei-Baruch/sqlboiler/strmangle"
	"github.com/pkg/errors"
	"gopkg.in/volatiletech/null.v6"
)
type TagI18n struct {
	TagID            int64       `boil:"tag_id" json:"tag_id" toml:"tag_id" yaml:"tag_id"`
	Language         string      `boil:"language" json:"language" toml:"language" yaml:"language"`
	OriginalLanguage null.String `boil:"original_language" json:"original_language,omitempty" toml:"original_language" yaml:"original_language,omitempty"`
	Label            null.String `boil:"label" json:"label,omitempty" toml:"label" yaml:"label,omitempty"`
	UserID           null.Int64  `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"`
	CreatedAt        time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	R *tagI18nR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L tagI18nL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var TagI18nColumns = struct {
	TagID            string
	Language         string
	OriginalLanguage string
	Label            string
	UserID           string
	CreatedAt        string
}{
	TagID:            "tag_id",
	Language:         "language",
	OriginalLanguage: "original_language",
	Label:            "label",
	UserID:           "user_id",
	CreatedAt:        "created_at",
}
type tagI18nR struct {
	Tag  *Tag
	User *User
}
type tagI18nL struct{}
var (
	tagI18nColumns               = []string{"tag_id", "language", "original_language", "label", "user_id", "created_at"}
	tagI18nColumnsWithoutDefault = []string{"tag_id", "language", "original_language", "label", "user_id"}
	tagI18nColumnsWithDefault    = []string{"created_at"}
	tagI18nPrimaryKeyColumns     = []string{"tag_id", "language"}
)
type (
	TagI18nSlice []*TagI18n
	tagI18nQuery struct {
		*queries.Query
	}
)
var (
	tagI18nType                 = reflect.TypeOf(&TagI18n{})
	tagI18nMapping              = queries.MakeStructMapping(tagI18nType)
	tagI18nPrimaryKeyMapping, _ = queries.BindMapping(tagI18nType, tagI18nMapping, tagI18nPrimaryKeyColumns)
	tagI18nInsertCacheMut       sync.RWMutex
	tagI18nInsertCache          = make(map[string]insertCache)
	tagI18nUpdateCacheMut       sync.RWMutex
	tagI18nUpdateCache          = make(map[string]updateCache)
	tagI18nUpsertCacheMut       sync.RWMutex
	tagI18nUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = bytes.MinRead
)
func (q tagI18nQuery) OneP() *TagI18n {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q tagI18nQuery) One() (*TagI18n, error) {
	o := &TagI18n{}
	queries.SetLimit(q.Query, 1)
	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "mdbmodels: failed to execute a one query for tag_i18n")
	}
	return o, nil
}
func (q tagI18nQuery) AllP() TagI18nSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q tagI18nQuery) All() (TagI18nSlice, error) {
	var o []*TagI18n
	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "mdbmodels: failed to assign all query results to TagI18n slice")
	}
	return o, nil
}
func (q tagI18nQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q tagI18nQuery) Count() (int64, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	err := q.Query.QueryRow().Scan(&count)
	if err != nil {
		return 0, errors.Wrap(err, "mdbmodels: failed to count tag_i18n rows")
	}
	return count, nil
}
func (q tagI18nQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q tagI18nQuery) Exists() (bool, error) {
	var count int64
	queries.SetCount(q.Query)
	queries.SetLimit(q.Query, 1)
	err := q.Query.QueryRow().Scan(&count)
	if err != nil {
		return false, errors.Wrap(err, "mdbmodels: failed to check if tag_i18n exists")
	}
	return count > 0, nil
}
func (o *TagI18n) TagG(mods ...qm.QueryMod) tagQuery {
	return o.Tag(boil.GetDB(), mods...)
}
func (o *TagI18n) Tag(exec boil.Executor, mods ...qm.QueryMod) tagQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.TagID),
	}
	queryMods = append(queryMods, mods...)
	query := Tags(exec, queryMods...)
	queries.SetFrom(query.Query, "\"tags\"")
	return query
}
func (o *TagI18n) UserG(mods ...qm.QueryMod) userQuery {
	return o.User(boil.GetDB(), mods...)
}