func (o *EthnicGroup) EthnicSubgroups(mods ...qm.QueryMod) ethnicSubgroupQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}

	queryMods = append(queryMods,
		qm.Where("\"ethnic_subgroup\".\"ethnic_group_id\"=?", o.EthnicGroupID),
	)

	query := EthnicSubgroups(queryMods...)
	queries.SetFrom(query.Query, "\"ethnic_subgroup\"")

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

	return query
}
// EthnicSubgroups retrieves all the ethnic_subgroup's EthnicSubgroups with an executor.
EthnicSubgroups retrieves all the ethnic_subgroup's EthnicSubgroups with an executor.
// EthnicSubgroups retrieves all the ethnic_subgroup ' s EthnicSubgroups with an executor .
func (o *EthnicGroup) EthnicSubgroups(mods ...qm.QueryMod) ethnicSubgroupQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"ethnic_subgroup\".\"ethnic_group_id\"=?", o.EthnicGroupID),
	)
	query := EthnicSubgroups(queryMods...)
	queries.SetFrom(query.Query, "\"ethnic_subgroup\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"ethnic_subgroup\".*"})
	}
	return query
}
func ( o * EthnicGroup ) EthnicSubgroups ( mods ... qm . QueryMod ) ethnicSubgroupQuery { var queryMods [ ] qm . QueryMod if len ( mods ) != 0 { queryMods = append ( queryMods , mods ... ) } queryMods = append ( queryMods , qm . Where ( " \" \" \" \" " , o . EthnicGroupID ) , ) query := EthnicSubgroups ( queryMods ... ) queries . SetFrom ( query . Query , " \" \" " ) if len ( queries . GetSelect ( query . Query ) ) == 0 { queries . SetSelect ( query . Query , [ ] string { " \" \" " } ) } return query }
EthnicSubgroups retrieves all the ethnic_subgroup's EthnicSubgroups with an executor.
EthnicSubgroups retrieves all the ethnic_subgroup ' s EthnicSubgroups with an executor .