i need my list of products in specific categories to be grouped by a relation

  1. {{ collection:store_products categories:contains="{ id }" }}
  2. {{ entries }} <- the entries should be grouped by a defined relation
  3. {{ title }}
  4. {{ /entries }}
  5. {{ /collection:store_products }}

i have tried:

  1. {{ collection:store_products categories:contains="{ id }" }}
  2. {{ entries group_by="type" }}
  3. {{ title }}
  4. {{ /entries }}
  5. {{ /collection:store_products }}

i get this error:
in EntriesTags.php line 37 at EntriesTags->index() at call_user_func(array(object(EntriesTags), 'index')) in Engine.php line 163 at Engine::renderTag('entries', array('group_by' => 'type'), '{{ id }}', array('page_object' => object(Entry), 'title' => 'Girls Dress', 'fieldset' => 'store_products', 'template' => 'store/product', 'order' => '3', 'sort_dir' => 'number', 'columns' => array('title'), .....


my categories look like this:

title: Lunch
products:
- fc6ba09f-6c04-45db-ba72-e4a93cec0dad
id: 34d3c0e1-bb2a-4312-9062-7f0481197a8d


my products look like this:

title: Superfood Salad
type: dde9c1f8-d381-4d03-9a6f-8ec33bd6f033
vendor: a91a1ffd-34e8-4548-805e-952c5753bb77
categories:
- 34d3c0e1-bb2a-4312-9062-7f0481197a8d
id: fc6ba09f-6c04-45db-ba72-e4a93cec0dad


my type look like this:

title: Voll Healthy
products:
- fc6ba09f-6c04-45db-ba72-e4a93cec0dad
id: dde9c1f8-d381-4d03-9a6f-8ec33bd6f033

help is much appriciated!