func (o *UserAccount) RemoveNameAfterLastName(ctx context.Context, exec boil.ContextExecutor, related *NameAfterLastName) error {
	var err error

	queries.SetScanner(&o.NameAfterLastNameID, nil)
	if _, err = o.Update(ctx, exec, boil.Whitelist("name_after_last_name_id")); err != nil {
		return errors.Wrap(err, "failed to update local table")
	}

	o.R.NameAfterLastName = nil
	if related == nil || related.R == nil {
		return nil
	}

	for i, ri := range related.R.UserAccounts {
		if queries.Equal(o.NameAfterLastNameID, ri.NameAfterLastNameID) {
			continue
		}

		ln := len(related.R.UserAccounts)
		if ln > 1 && i < ln-1 {
			related.R.UserAccounts[i] = related.R.UserAccounts[ln-1]
		}
		related.R.UserAccounts = related.R.UserAccounts[:ln-1]
		break
	}
	return nil
}
// RemoveNameAfterLastName relationship.
// Sets o.R.NameAfterLastName to nil.
// Removes o from all passed in related items' relationships struct (Optional).
RemoveNameAfterLastName relationship.
Sets o.R.NameAfterLastName to nil.
Removes o from all passed in related items' relationships struct (Optional).
// RemoveNameAfterLastName relationship . // Sets o . R . NameAfterLastName to nil . // Removes o from all passed in related items ' relationships struct ( Optional ) .
func (o *UserAccount) RemoveNameAfterLastName(ctx context.Context, exec boil.ContextExecutor, related *NameAfterLastName) error {
	var err error
	queries.SetScanner(&o.NameAfterLastNameID, nil)
	if _, err = o.Update(ctx, exec, boil.Whitelist("name_after_last_name_id")); err != nil {
		return errors.Wrap(err, "failed to update local table")
	}
	o.R.NameAfterLastName = nil
	if related == nil || related.R == nil {
		return nil
	}
	for i, ri := range related.R.UserAccounts {
		if queries.Equal(o.NameAfterLastNameID, ri.NameAfterLastNameID) {
			continue
		}
		ln := len(related.R.UserAccounts)
		if ln > 1 && i < ln-1 {
			related.R.UserAccounts[i] = related.R.UserAccounts[ln-1]
		}
		related.R.UserAccounts = related.R.UserAccounts[:ln-1]
		break
	}
	return nil
}
func ( o * UserAccount ) RemoveNameAfterLastName ( ctx context . Context , exec boil . ContextExecutor , related * NameAfterLastName ) error { var err error queries . SetScanner ( & o . NameAfterLastNameID , nil ) if _ , err = o . Update ( ctx , exec , boil . Whitelist ( " " ) ) ; err != nil { return errors . Wrap ( err , " " ) } o . R . NameAfterLastName = nil if related == nil || related . R == nil { return nil } for i , ri := range related . R . UserAccounts { if queries . Equal ( o . NameAfterLastNameID , ri . NameAfterLastNameID ) { continue } ln := len ( related . R . UserAccounts ) if ln > 1 && i < ln - 1 { related . R . UserAccounts [ i ] = related . R . UserAccounts [ ln - 1 ] } related . R . UserAccounts = related . R . UserAccounts [ : ln - 1 ] break } return nil }
RemoveNameAfterLastName relationship.
RemoveNameAfterLastName relationship .