func (o *Emoji) SetPollsFactorsPositions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PollsFactorsPosition) error {
	query := "update \"polls_factors_positions\" set \"emoji_id\" = null where \"emoji_id\" = $1"
	values := []interface{}{o.EmojiID}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, query)
		fmt.Fprintln(boil.DebugWriter, values)
	}

	_, err := exec.ExecContext(ctx, query, values...)
	if err != nil {
		return errors.Wrap(err, "failed to remove relationships before set")
	}

	if o.R != nil {
		for _, rel := range o.R.PollsFactorsPositions {
			queries.SetScanner(&rel.EmojiID, nil)
			if rel.R == nil {
				continue
			}

			rel.R.Emoji = nil
		}

		o.R.PollsFactorsPositions = nil
	}
	return o.AddPollsFactorsPositions(ctx, exec, insert, related...)
}
// SetPollsFactorsPositions removes all previously related items of the
// emoji replacing them completely with the passed
// in related items, optionally inserting them as new records.
// Sets o.R.Emoji's PollsFactorsPositions accordingly.
// Replaces o.R.PollsFactorsPositions with related.
// Sets related.R.Emoji's PollsFactorsPositions accordingly.
SetPollsFactorsPositions removes all previously related items of the
emoji replacing them completely with the passed
in related items, optionally inserting them as new records.
Sets o.R.Emoji's PollsFactorsPositions accordingly.
Replaces o.R.PollsFactorsPositions with related.
Sets related.R.Emoji's PollsFactorsPositions accordingly.
// SetPollsFactorsPositions removes all previously related items of the // emoji replacing them completely with the passed // in related items optionally inserting them as new records . // Sets o . R . Emoji ' s PollsFactorsPositions accordingly . // Replaces o . R . PollsFactorsPositions with related . // Sets related . R . Emoji ' s PollsFactorsPositions accordingly .
func (o *Emoji) SetPollsFactorsPositions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PollsFactorsPosition) error {
	query := "update \"polls_factors_positions\" set \"emoji_id\" = null where \"emoji_id\" = $1"
	values := []interface{}{o.EmojiID}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, query)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	_, err := exec.ExecContext(ctx, query, values...)
	if err != nil {
		return errors.Wrap(err, "failed to remove relationships before set")
	}
	if o.R != nil {
		for _, rel := range o.R.PollsFactorsPositions {
			queries.SetScanner(&rel.EmojiID, nil)
			if rel.R == nil {
				continue
			}
			rel.R.Emoji = nil
		}
		o.R.PollsFactorsPositions = nil
	}
	return o.AddPollsFactorsPositions(ctx, exec, insert, related...)
}
func ( o * Emoji ) SetPollsFactorsPositions ( ctx context . Context , exec boil . ContextExecutor , insert bool , related ... * PollsFactorsPosition ) error { query := " \" \" \" \" \" \" " values := [ ] interface { } { o . EmojiID } if boil . DebugMode { fmt . Fprintln ( boil . DebugWriter , query ) fmt . Fprintln ( boil . DebugWriter , values ) } _ , err := exec . ExecContext ( ctx , query , values ... ) if err != nil { return errors . Wrap ( err , " " ) } if o . R != nil { for _ , rel := range o . R . PollsFactorsPositions { queries . SetScanner ( & rel . EmojiID , nil ) if rel . R == nil { continue } rel . R . Emoji = nil } o . R . PollsFactorsPositions = nil } return o . AddPollsFactorsPositions ( ctx , exec , insert , related ... ) }
SetPollsFactorsPositions removes all previously related items of the
emoji replacing them completely with the passed
in related items, optionally inserting them as new records.
SetPollsFactorsPositions removes all previously related items of the emoji replacing them completely with the passed in related items optionally inserting them as new records .