Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6627

.NET: cache deserialization fails with complex value type & enum

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.4
    • platforms

    Description

      There is an deserialization issue with complex structure.

      Please see the sample code below:

          public enum SampleEnum : byte
          {
              One = 0,
              Two = 1,
              Three = 2
          }
      
                      var cache = ignite.GetOrCreateCache<string, Dictionary<SampleEnum, Dictionary<int, int>>>("mySampleCache");
                      cache.Put("DictData", Dict);
                      var result = cache.Get("DictData");                
      

      var result = cache.Get("DictData"); fails with exception:

      {"The constructor to deserialize an object of type 'System.Collections.Generic.ObjectEqualityComparer`1[SampleProject.SampleEnum]' was not found."}

      If we change
      Dictionary<SampleEnum, Dictionary<int, int>>
      to
      Dictionary<int, Dictionary<int, int>>
      then everything works fine

      Attachments

        Activity

          People

            ptupitsyn Pavel Tupitsyn
            alexey.tank2 Alexey Popov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: