func (m *GormAreaRepository) ListChildren(ctx context.Context, parentArea *Area) ([]Area, error) {
	defer goa.MeasureSince([]string{"goa", "db", "Area", "querychild"}, time.Now())
	var objs []Area

	tx := m.db.Where("path ~ ?", path.ToExpression(parentArea.Path, parentArea.ID)).Find(&objs)
	if tx.RecordNotFound() {
		return nil, errors.NewNotFoundError("Area", parentArea.ID.String())
	}
	if tx.Error != nil {
		return nil, errors.NewInternalError(tx.Error.Error())
	}
	return objs, nil
}
// ListChildren fetches all Areas belonging to a parent - list all child areas.
ListChildren fetches all Areas belonging to a parent - list all child areas.
// ListChildren fetches all Areas belonging to a parent - list all child areas .
func (m *GormAreaRepository) ListChildren(ctx context.Context, parentArea *Area) ([]Area, error) {
	defer goa.MeasureSince([]string{"goa", "db", "Area", "querychild"}, time.Now())
	var objs []Area
	tx := m.db.Where("path ~ ?", path.ToExpression(parentArea.Path, parentArea.ID)).Find(&objs)
	if tx.RecordNotFound() {
		return nil, errors.NewNotFoundError("Area", parentArea.ID.String())
	}
	if tx.Error != nil {
		return nil, errors.NewInternalError(tx.Error.Error())
	}
	return objs, nil
}
func ( m * GormAreaRepository ) ListChildren ( ctx context . Context , parentArea * Area ) ( [ ] Area , error ) { defer goa . MeasureSince ( [ ] string { " " , " " , " " , " " } , time . Now ( ) ) var objs [ ] Area tx := m . db . Where ( " " , path . ToExpression ( parentArea . Path , parentArea . ID ) ) . Find ( & objs ) if tx . RecordNotFound ( ) { return nil , errors . NewNotFoundError ( " " , parentArea . ID . String ( ) ) } if tx . Error != nil { return nil , errors . NewInternalError ( tx . Error . Error ( ) ) } return objs , nil }
ListChildren fetches all Areas belonging to a parent - list all child areas.
ListChildren fetches all Areas belonging to a parent - list all child areas .