Gopu_Tunas
Gopu_Tunas

Reputation: 194

Conflicting field IDs error in Ignite C# thin client

I am trying to store entity in a Ignite-Cache using C# thin client. I have below scenario

public class A
    {
        DateTime StartDate { get; set; }
    }

    public class B:A
    {
        DateTime StartDate { get; set; }
    }

When i am trying to store instance object of class B in ignite store it give me below error.

IgniteThinClient.GetCache<Tkey, TValue>("CacheName")

It gives me below error

Apache.Ignite.Core.Binary.BinaryObjectException: 'Conflicting field IDs [type=B, field1=StartDate , field2=StartDate , fieldId=104069929]'

Similar issue links

https://issues.apache.org/jira/browse/IGNITE-8588

Apache Ignite 2.1: Getting a "Conflicting type IDs" error after upgrading from 2.0

How can I turn off binary object storing for C# thin client? Will that will help to resolve this issue?

Upvotes: 0

Views: 133

Answers (1)

alamar
alamar

Reputation: 19313

Please check out docs on serialization. You could try to implement IBinarizable in B, and only write the field that you care about (or put both under differing names). Your mileage may vary.

Upvotes: 2

Related Questions