Error when serializing base types in hierarchies
Opened this issue · 8 comments
Hello,
I am trying to run a simple TestClusterBuilder, like this:
var builder = new TestClusterBuilder();
var cluster = builder.Build();
cluster.Deploy();
[GenerateSerializer]
public sealed class MyIds : Collection<MyId>
{
}
[GenerateSerializer]
public sealed record MyId(Guid Value)
{
}
and I am getting:
System.Collections.Generic.KeyNotFoundException : Could not find a base type serializer for type System.Collections.ObjectModel.Collection`1[namespace.....MyId].
Do you have any idea why this might be happening?
I tried removing the "sealed" keyword too and it didn't change anything.
@octavian-niculescu10 which version of Orleans are you using?
@ReubenBond version 7.2.6. I had to write a codec so it could work
This is a bug we need to fix by implementing IBaseCodec on CollectionCodec, similar to List
Thank you!
I opened #9200 as a sub issue to fix this one.
Thanks. I've just read the issue you mentioned - should it be working with GroupIds : List instead of GroupIds : Collection? because it's not :)
If you inherit from List<T>
instead of Collection<T>
, it will work with v8.2.0 (#9005)
Got it, thanks