func (o *State) PollsStates(mods ...qm.QueryMod) pollsStateQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}

	queryMods = append(queryMods,
		qm.Where("\"polls_state\".\"state_id\"=?", o.StateID),
	)

	query := PollsStates(queryMods...)
	queries.SetFrom(query.Query, "\"polls_state\"")

	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"polls_state\".*"})
	}

	return query
}
// PollsStates retrieves all the polls_state's PollsStates with an executor.
PollsStates retrieves all the polls_state's PollsStates with an executor.
// PollsStates retrieves all the polls_state ' s PollsStates with an executor .
func (o *State) PollsStates(mods ...qm.QueryMod) pollsStateQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"polls_state\".\"state_id\"=?", o.StateID),
	)
	query := PollsStates(queryMods...)
	queries.SetFrom(query.Query, "\"polls_state\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"polls_state\".*"})
	}
	return query
}
func ( o * State ) PollsStates ( mods ... qm . QueryMod ) pollsStateQuery { var queryMods [ ] qm . QueryMod if len ( mods ) != 0 { queryMods = append ( queryMods , mods ... ) } queryMods = append ( queryMods , qm . Where ( " \" \" \" \" " , o . StateID ) , ) query := PollsStates ( queryMods ... ) queries . SetFrom ( query . Query , " \" \" " ) if len ( queries . GetSelect ( query . Query ) ) == 0 { queries . SetSelect ( query . Query , [ ] string { " \" \" " } ) } return query }
PollsStates retrieves all the polls_state's PollsStates with an executor.
PollsStates retrieves all the polls_state ' s PollsStates with an executor .