// UngroupedServices get list of services without any application group
UngroupedServices get list of services without any application group
// UngroupedServices get list of services without any application group
func (agmr *AppGroupMongoRepository) UngroupedServices() []service.Service {
	var servicesThatMatch []service.Service
	query := []bson.M{
		{"$lookup": bson.M{"from": constants.SERVICE_APPS_GROUP_COLLECTION, "localField": "_id", "foreignField": "services", "as": "service_app_group"}},
		{"$addFields": bson.M{"zeroAppGroups": bson.M{"$not": bson.M{"$size": "$service_app_group"}}}},
		{"$match": bson.M{"zeroAppGroups": true}},
	}
	agmr.Collection.Pipe(query).All(&servicesThatMatch)
	return servicesThatMatch
}
func ( agmr * AppGroupMongoRepository ) UngroupedServices ( ) [ ] service . Service { var servicesThatMatch [ ] service . Service query := [ ] bson . M { { " " : bson . M { " " : constants . SERVICE_APPS_GROUP_COLLECTION , " " : " " , " " : " " , " " : " " } } , { " " : bson . M { " " : bson . M { " " : bson . M { " " : " " } } } } , { " " : bson . M { " " : true } } , } agmr . Collection . Pipe ( query ) . All ( & servicesThatMatch ) return servicesThatMatch }
UngroupedServices get list of services without any application group
UngroupedServices get list of services without any application group