I try to load all my Categories from a database and then map them to Map (dictionary?), However, when I use the following code:
[<StructuralComparison>] type Category = { mutable Id: string; Name: string; SavePath: string; Tags: ResizeArray<Tag> } let categories = session.Query<Category>() |> Seq.map(fun z -> (z,0)) |> Map.ofSeq
it just gives an error message:
The Category, Record, or Union type "Category" has the "Structural Compatibility" attribute, but the type of the "ResizeArray" component does not satisfy the "comparison" constraint
I have absolutely no information on what to do, so any help is appreciated!
source share