func (o ContentUnitsPersonSlice) UpdateAllP(exec boil.Executor, cols M) {
	if err := o.UpdateAll(exec, cols); err != nil {
		panic(boil.WrapErr(err))
	}
}
UpdateAllP updates all rows with the specified column values, and panics on error.
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"
)
type ContentUnitsPerson struct {
	ContentUnitID int64 `boil:"content_unit_id" json:"content_unit_id" toml:"content_unit_id" yaml:"content_unit_id"`
	PersonID      int64 `boil:"person_id" json:"person_id" toml:"person_id" yaml:"person_id"`
	RoleID        int64 `boil:"role_id" json:"role_id" toml:"role_id" yaml:"role_id"`
	R *contentUnitsPersonR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L contentUnitsPersonL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var ContentUnitsPersonColumns = struct {
	ContentUnitID string
	PersonID      string
	RoleID        string
}{
	ContentUnitID: "content_unit_id",
	PersonID:      "person_id",
	RoleID:        "role_id",
}
type contentUnitsPersonR struct {
	ContentUnit *ContentUnit
	Person      *Person
	Role        *ContentRoleType
}
type contentUnitsPersonL struct{}
var (
	contentUnitsPersonColumns               = []string{"content_unit_id", "person_id", "role_id"}
	contentUnitsPersonColumnsWithoutDefault = []string{"content_unit_id", "person_id", "role_id"}
	contentUnitsPersonColumnsWithDefault    = []string{}
	contentUnitsPersonPrimaryKeyColumns     = []string{"content_unit_id", "person_id"}
)
type (
	ContentUnitsPersonSlice []*ContentUnitsPerson
	contentUnitsPersonQuery struct {
		*queries.Query
	}
)
var (
	contentUnitsPersonType                 = reflect.TypeOf(&ContentUnitsPerson{})
	contentUnitsPersonMapping              = queries.MakeStructMapping(contentUnitsPersonType)
	contentUnitsPersonPrimaryKeyMapping, _ = queries.BindMapping(contentUnitsPersonType, contentUnitsPersonMapping, contentUnitsPersonPrimaryKeyColumns)
	contentUnitsPersonInsertCacheMut       sync.RWMutex
	contentUnitsPersonInsertCache          = make(map[string]insertCache)
	contentUnitsPersonUpdateCacheMut       sync.RWMutex
	contentUnitsPersonUpdateCache          = make(map[string]updateCache)
	contentUnitsPersonUpsertCacheMut       sync.RWMutex
	contentUnitsPersonUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = bytes.MinRead
)
func (q contentUnitsPersonQuery) OneP() *ContentUnitsPerson {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q contentUnitsPersonQuery) One() (*ContentUnitsPerson, error) {
	o := &ContentUnitsPerson{}
	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 content_units_persons")
	}
	return o, nil
}
func (q contentUnitsPersonQuery) AllP() ContentUnitsPersonSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q contentUnitsPersonQuery) All() (ContentUnitsPersonSlice, error) {
	var o []*ContentUnitsPerson
	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "mdbmodels: failed to assign all query results to ContentUnitsPerson slice")
	}
	return o, nil
}
func (q contentUnitsPersonQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q contentUnitsPersonQuery) 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 content_units_persons rows")
	}
	return count, nil
}
func (q contentUnitsPersonQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q contentUnitsPersonQuery) 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 content_units_persons exists")
	}
	return count > 0, nil
}
func (o *ContentUnitsPerson) ContentUnitG(mods ...qm.QueryMod) contentUnitQuery {
	return o.ContentUnit(boil.GetDB(), mods...)
}
func (o *ContentUnitsPerson) ContentUnit(exec boil.Executor, mods ...qm.QueryMod) contentUnitQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.ContentUnitID),
	}
	queryMods = append(queryMods, mods...)
	query := ContentUnits(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_units\"")
	return query
}
func (o *ContentUnitsPerson) PersonG(mods ...qm.QueryMod) personQuery {
	return o.Person(boil.GetDB(), mods...)
}
func (o *ContentUnitsPerson) Person(exec boil.Executor, mods ...qm.QueryMod) personQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.PersonID),
	}
	queryMods = append(queryMods, mods...)
	query := Persons(exec, queryMods...)
	queries.SetFrom(query.Query, "\"persons\"")
	return query
}
func (o *ContentUnitsPerson) RoleG(mods ...qm.QueryMod) contentRoleTypeQuery {
	return o.Role(boil.GetDB(), mods...)
}
func (o *ContentUnitsPerson) Role(exec boil.Executor, mods ...qm.QueryMod) contentRoleTypeQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.RoleID),
	}
	queryMods = append(queryMods, mods...)
	query := ContentRoleTypes(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_role_types\"")
	return query
}  
func (contentUnitsPersonL) LoadContentUnit(e boil.Executor, singular bool, maybeContentUnitsPerson interface{}) error {
	var slice []*ContentUnitsPerson
	var object *ContentUnitsPerson
	count := 1
	if singular {
		object = maybeContentUnitsPerson.(*ContentUnitsPerson)
	} else {
		slice = *maybeContentUnitsPerson.(*[]*ContentUnitsPerson)
		count = len(slice)
	}
	args := make([]interface{}, count)
	if singular {
		if object.R == nil {
			object.R = &contentUnitsPersonR{}
		}
		args[0] = object.ContentUnitID
	} else {
		for i, obj := range slice {
			if obj.R == nil {
				obj.R = &contentUnitsPersonR{}
			}
			args[i] = obj.ContentUnitID
		}
	}
	query := fmt.Sprintf(
		"select * from \"content_units\" where \"id\" in (%s)",
		strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
	)
	if boil.DebugMode {
		fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
	}
	results, err := e.Query(query, args...)
	if err != nil {
		return errors.Wrap(err, "failed to eager load ContentUnit")
	}
	defer results.Close()
	var resultSlice []*ContentUnit
	if err = queries.Bind(results, &resultSlice); err != nil {
		return errors.Wrap(err, "failed to bind eager loaded slice ContentUnit")
	}
	if len(resultSlice) == 0 {
		return nil
	}
	if singular {
		object.R.ContentUnit = resultSlice[0]
		return nil
	}
	for _, local := range slice {
		for _, foreign := range resultSlice {
			if local.ContentUnitID == foreign.ID {
				local.R.ContentUnit = foreign
				break
			}
		}
	}
	return nil
}
func (contentUnitsPersonL) LoadPerson(e boil.Executor, singular bool, maybeContentUnitsPerson interface{}) error {
	var slice []*ContentUnitsPerson
	var object *ContentUnitsPerson
	count := 1
	if singular {
		object = maybeContentUnitsPerson.(*ContentUnitsPerson)
	} else {
		slice = *maybeContentUnitsPerson.(*[]*ContentUnitsPerson)
		count = len(slice)
	}
	args := make([]interface{}, count)
	if singular {
		if object.R == nil {
			object.R = &contentUnitsPersonR{}
		}
		args[0] = object.PersonID
	} else {
		for i, obj := range slice {
			if obj.R == nil {
				obj.R = &contentUnitsPersonR{}
			}
			args[i] = obj.PersonID
		}
	}
	query := fmt.Sprintf(
		"select * from \"persons\" where \"id\" in (%s)",
		strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
	)
	if boil.DebugMode {
		fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
	}
	results, err := e.Query(query, args...)
	if err != nil {
		return errors.Wrap(err, "failed to eager load Person")
	}
	defer results.Close()
	var resultSlice []*Person
	if err = queries.Bind(results, &resultSlice); err != nil {
		return errors.Wrap(err, "failed to bind eager loaded slice Person")
	}
	if len(resultSlice) == 0 {
		return nil
	}
	if singular {
		object.R.Person = resultSlice[0]
		return nil
	}
	for _, local := range slice {
		for _, foreign := range resultSlice {
			if local.PersonID == foreign.ID {
				local.R.Person = foreign
				break
			}
		}
	}
	return nil
}
func (contentUnitsPersonL) LoadRole(e boil.Executor, singular bool, maybeContentUnitsPerson interface{}) error {
	var slice []*ContentUnitsPerson
	var object *ContentUnitsPerson
	count := 1
	if singular {
		object = maybeContentUnitsPerson.(*ContentUnitsPerson)
	} else {
		slice = *maybeContentUnitsPerson.(*[]*ContentUnitsPerson)
		count = len(slice)
	}
	args := make([]interface{}, count)
	if singular {
		if object.R == nil {
			object.R = &contentUnitsPersonR{}
		}
		args[0] = object.RoleID
	} else {
		for i, obj := range slice {
			if obj.R == nil {
				obj.R = &contentUnitsPersonR{}
			}
			args[i] = obj.RoleID
		}
	}
	query := fmt.Sprintf(
		"select * from \"content_role_types\" where \"id\" in (%s)",
		strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
	)
	if boil.DebugMode {
		fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
	}
	results, err := e.Query(query, args...)
	if err != nil {
		return errors.Wrap(err, "failed to eager load ContentRoleType")
	}
	defer results.Close()
	var resultSlice []*ContentRoleType
	if err = queries.Bind(results, &resultSlice); err != nil {
		return errors.Wrap(err, "failed to bind eager loaded slice ContentRoleType")
	}
	if len(resultSlice) == 0 {
		return nil
	}
	if singular {
		object.R.Role = resultSlice[0]
		return nil
	}
	for _, local := range slice {
		for _, foreign := range resultSlice {
			if local.RoleID == foreign.ID {
				local.R.Role = foreign
				break
			}
		}
	}
	return nil
}
func (o *ContentUnitsPerson) SetContentUnitG(insert bool, related *ContentUnit) error {
	return o.SetContentUnit(boil.GetDB(), insert, related)
}
func (o *ContentUnitsPerson) SetContentUnitP(exec boil.Executor, insert bool, related *ContentUnit) {
	if err := o.SetContentUnit(exec, insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetContentUnitGP(insert bool, related *ContentUnit) {
	if err := o.SetContentUnit(boil.GetDB(), insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetContentUnit(exec boil.Executor, insert bool, related *ContentUnit) error {
	var err error
	if insert {
		if err = related.Insert(exec); err != nil {
			return errors.Wrap(err, "failed to insert into foreign table")
		}
	}
	updateQuery := fmt.Sprintf(
		"UPDATE \"content_units_persons\" SET %s WHERE %s",
		strmangle.SetParamNames("\"", "\"", 1, []string{"content_unit_id"}),
		strmangle.WhereClause("\"", "\"", 2, contentUnitsPersonPrimaryKeyColumns),
	)
	values := []interface{}{related.ID, o.ContentUnitID, o.PersonID}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, updateQuery)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	if _, err = exec.Exec(updateQuery, values...); err != nil {
		return errors.Wrap(err, "failed to update local table")
	}
	o.ContentUnitID = related.ID
	if o.R == nil {
		o.R = &contentUnitsPersonR{
			ContentUnit: related,
		}
	} else {
		o.R.ContentUnit = related
	}
	if related.R == nil {
		related.R = &contentUnitR{
			ContentUnitsPersons: ContentUnitsPersonSlice{o},
		}
	} else {
		related.R.ContentUnitsPersons = append(related.R.ContentUnitsPersons, o)
	}
	return nil
}
func (o *ContentUnitsPerson) SetPersonG(insert bool, related *Person) error {
	return o.SetPerson(boil.GetDB(), insert, related)
}
func (o *ContentUnitsPerson) SetPersonP(exec boil.Executor, insert bool, related *Person) {
	if err := o.SetPerson(exec, insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetPersonGP(insert bool, related *Person) {
	if err := o.SetPerson(boil.GetDB(), insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetPerson(exec boil.Executor, insert bool, related *Person) error {
	var err error
	if insert {
		if err = related.Insert(exec); err != nil {
			return errors.Wrap(err, "failed to insert into foreign table")
		}
	}
	updateQuery := fmt.Sprintf(
		"UPDATE \"content_units_persons\" SET %s WHERE %s",
		strmangle.SetParamNames("\"", "\"", 1, []string{"person_id"}),
		strmangle.WhereClause("\"", "\"", 2, contentUnitsPersonPrimaryKeyColumns),
	)
	values := []interface{}{related.ID, o.ContentUnitID, o.PersonID}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, updateQuery)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	if _, err = exec.Exec(updateQuery, values...); err != nil {
		return errors.Wrap(err, "failed to update local table")
	}
	o.PersonID = related.ID
	if o.R == nil {
		o.R = &contentUnitsPersonR{
			Person: related,
		}
	} else {
		o.R.Person = related
	}
	if related.R == nil {
		related.R = &personR{
			ContentUnitsPersons: ContentUnitsPersonSlice{o},
		}
	} else {
		related.R.ContentUnitsPersons = append(related.R.ContentUnitsPersons, o)
	}
	return nil
}
func (o *ContentUnitsPerson) SetRoleG(insert bool, related *ContentRoleType) error {
	return o.SetRole(boil.GetDB(), insert, related)
}
func (o *ContentUnitsPerson) SetRoleP(exec boil.Executor, insert bool, related *ContentRoleType) {
	if err := o.SetRole(exec, insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetRoleGP(insert bool, related *ContentRoleType) {
	if err := o.SetRole(boil.GetDB(), insert, related); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) SetRole(exec boil.Executor, insert bool, related *ContentRoleType) error {
	var err error
	if insert {
		if err = related.Insert(exec); err != nil {
			return errors.Wrap(err, "failed to insert into foreign table")
		}
	}
	updateQuery := fmt.Sprintf(
		"UPDATE \"content_units_persons\" SET %s WHERE %s",
		strmangle.SetParamNames("\"", "\"", 1, []string{"role_id"}),
		strmangle.WhereClause("\"", "\"", 2, contentUnitsPersonPrimaryKeyColumns),
	)
	values := []interface{}{related.ID, o.ContentUnitID, o.PersonID}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, updateQuery)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	if _, err = exec.Exec(updateQuery, values...); err != nil {
		return errors.Wrap(err, "failed to update local table")
	}
	o.RoleID = related.ID
	if o.R == nil {
		o.R = &contentUnitsPersonR{
			Role: related,
		}
	} else {
		o.R.Role = related
	}
	if related.R == nil {
		related.R = &contentRoleTypeR{
			RoleContentUnitsPersons: ContentUnitsPersonSlice{o},
		}
	} else {
		related.R.RoleContentUnitsPersons = append(related.R.RoleContentUnitsPersons, o)
	}
	return nil
}
func ContentUnitsPersonsG(mods ...qm.QueryMod) contentUnitsPersonQuery {
	return ContentUnitsPersons(boil.GetDB(), mods...)
}
func ContentUnitsPersons(exec boil.Executor, mods ...qm.QueryMod) contentUnitsPersonQuery {
	mods = append(mods, qm.From("\"content_units_persons\""))
	return contentUnitsPersonQuery{NewQuery(exec, mods...)}
}
func FindContentUnitsPersonG(contentUnitID int64, personID int64, selectCols ...string) (*ContentUnitsPerson, error) {
	return FindContentUnitsPerson(boil.GetDB(), contentUnitID, personID, selectCols...)
}
func FindContentUnitsPersonGP(contentUnitID int64, personID int64, selectCols ...string) *ContentUnitsPerson {
	retobj, err := FindContentUnitsPerson(boil.GetDB(), contentUnitID, personID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func FindContentUnitsPerson(exec boil.Executor, contentUnitID int64, personID int64, selectCols ...string) (*ContentUnitsPerson, error) {
	contentUnitsPersonObj := &ContentUnitsPerson{}
	sel := "*"
	if len(selectCols) > 0 {
		sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
	}
	query := fmt.Sprintf(
		"select %s from \"content_units_persons\" where \"content_unit_id\"=$1 AND \"person_id\"=$2", sel,
	)
	q := queries.Raw(exec, query, contentUnitID, personID)
	err := q.Bind(contentUnitsPersonObj)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "mdbmodels: unable to select from content_units_persons")
	}
	return contentUnitsPersonObj, nil
}
func FindContentUnitsPersonP(exec boil.Executor, contentUnitID int64, personID int64, selectCols ...string) *ContentUnitsPerson {
	retobj, err := FindContentUnitsPerson(exec, contentUnitID, personID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func (o *ContentUnitsPerson) InsertG(whitelist ...string) error {
	return o.Insert(boil.GetDB(), whitelist...)
}
func (o *ContentUnitsPerson) InsertGP(whitelist ...string) {
	if err := o.Insert(boil.GetDB(), whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) InsertP(exec boil.Executor, whitelist ...string) {
	if err := o.Insert(exec, whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) Insert(exec boil.Executor, whitelist ...string) error {
	if o == nil {
		return errors.New("mdbmodels: no content_units_persons provided for insertion")
	}
	var err error
	nzDefaults := queries.NonZeroDefaultSet(contentUnitsPersonColumnsWithDefault, o)
	key := makeCacheKey(whitelist, nzDefaults)
	contentUnitsPersonInsertCacheMut.RLock()
	cache, cached := contentUnitsPersonInsertCache[key]
	contentUnitsPersonInsertCacheMut.RUnlock()
	if !cached {
		wl, returnColumns := strmangle.InsertColumnSet(
			contentUnitsPersonColumns,
			contentUnitsPersonColumnsWithDefault,
			contentUnitsPersonColumnsWithoutDefault,
			nzDefaults,
			whitelist,
		)
		cache.valueMapping, err = queries.BindMapping(contentUnitsPersonType, contentUnitsPersonMapping, wl)
		if err != nil {
			return err
		}
		cache.retMapping, err = queries.BindMapping(contentUnitsPersonType, contentUnitsPersonMapping, returnColumns)
		if err != nil {
			return err
		}
		if len(wl) != 0 {
			cache.query = fmt.Sprintf("INSERT INTO \"content_units_persons\" (\"%s\") %%sVALUES (%s)%%s", strings.Join(wl, "\",\""), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))
		} else {
			cache.query = "INSERT INTO \"content_units_persons\" DEFAULT VALUES"
		}
		var queryOutput, queryReturning string
		if len(cache.retMapping) != 0 {
			queryReturning = fmt.Sprintf(" RETURNING \"%s\"", strings.Join(returnColumns, "\",\""))
		}
		if len(wl) != 0 {
			cache.query = fmt.Sprintf(cache.query, queryOutput, queryReturning)
		}
	}
	value := reflect.Indirect(reflect.ValueOf(o))
	vals := queries.ValuesFromMapping(value, cache.valueMapping)
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, cache.query)
		fmt.Fprintln(boil.DebugWriter, vals)
	}
	if len(cache.retMapping) != 0 {
		err = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)
	} else {
		_, err = exec.Exec(cache.query, vals...)
	}
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to insert into content_units_persons")
	}
	if !cached {
		contentUnitsPersonInsertCacheMut.Lock()
		contentUnitsPersonInsertCache[key] = cache
		contentUnitsPersonInsertCacheMut.Unlock()
	}
	return nil
}
func (o *ContentUnitsPerson) UpdateG(whitelist ...string) error {
	return o.Update(boil.GetDB(), whitelist...)
}
func (o *ContentUnitsPerson) UpdateGP(whitelist ...string) {
	if err := o.Update(boil.GetDB(), whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) UpdateP(exec boil.Executor, whitelist ...string) {
	err := o.Update(exec, whitelist...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *ContentUnitsPerson) Update(exec boil.Executor, whitelist ...string) error {
	var err error
	key := makeCacheKey(whitelist, nil)
	contentUnitsPersonUpdateCacheMut.RLock()
	cache, cached := contentUnitsPersonUpdateCache[key]
	contentUnitsPersonUpdateCacheMut.RUnlock()
	if !cached {
		wl := strmangle.UpdateColumnSet(
			contentUnitsPersonColumns,
			contentUnitsPersonPrimaryKeyColumns,
			whitelist,
		)
		if len(wl) == 0 {
			return errors.New("mdbmodels: unable to update content_units_persons, could not build whitelist")
		}
		cache.query = fmt.Sprintf("UPDATE \"content_units_persons\" SET %s WHERE %s",
			strmangle.SetParamNames("\"", "\"", 1, wl),
			strmangle.WhereClause("\"", "\"", len(wl)+1, contentUnitsPersonPrimaryKeyColumns),
		)
		cache.valueMapping, err = queries.BindMapping(contentUnitsPersonType, contentUnitsPersonMapping, append(wl, contentUnitsPersonPrimaryKeyColumns...))
		if err != nil {
			return err
		}
	}
	values := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, cache.query)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	_, err = exec.Exec(cache.query, values...)
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to update content_units_persons row")
	}
	if !cached {
		contentUnitsPersonUpdateCacheMut.Lock()
		contentUnitsPersonUpdateCache[key] = cache
		contentUnitsPersonUpdateCacheMut.Unlock()
	}
	return nil
}
func (q contentUnitsPersonQuery) UpdateAllP(cols M) {
	if err := q.UpdateAll(cols); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (q contentUnitsPersonQuery) UpdateAll(cols M) error {
	queries.SetUpdate(q.Query, cols)
	_, err := q.Query.Exec()
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to update all for content_units_persons")
	}
	return nil
}
func (o ContentUnitsPersonSlice) UpdateAllG(cols M) error {
	return o.UpdateAll(boil.GetDB(), cols)
}
func (o ContentUnitsPersonSlice) UpdateAllGP(cols M) {
	if err := o.UpdateAll(boil.GetDB(), cols); err != nil {
		panic(boil.WrapErr(err))
	}
}