Bevel cannot tell which dataset a group belongs to

The group's parent dataset is unclear, missing, or not a list.

  • Error
  • BEVEL062

What it means

A group needs one parent list dataset. This fails when the item type is used by several datasets, when Source names a dataset that does not hold that item type, or when the parent holds a single object.

Example message

text
Data/Posts/BlogPost.cs(6,15): error BEVEL062: [GroupBy("Tags")] on 'BlogPost.Tags': BlogPost is the item type of several datasets ('Posts', 'Drafts'). Set Source = "..." to choose the parent. Help: https://khalidabuhakmeh.github.io/bevel/reference/diagnostics/bevel062/

How to fix

Name the parent with Source, or make the parent a list.

csharp
[GroupBy("Tags")]
[GroupBy("Tags", Source = "Posts")]
public string[] Tags { get; init; }