Pivotal Knowledge Base

Follow

Unable to get result in Native Client by query with specified condition and ReflectionBasedAutoSerializer

Applies to

GemFire Native Client 7.x and 8.X

Issue

When using the PDX reflection-based auto-serializer registered in a Native Client, queries filtered on specific field value fail to return matching entries. For instance, using a simple C# class as the object inserted into region /Region:

  class TestPDXobject
    {
      public string name { get; set; }
      public string id { get; set; }
      public TestPDXobject() { }
    }

which is then registered with the PDX reflection-based autoserializer:

  Serializable.RegisterPdxSerializer(new ReflectionBasedAutoSerializer());

queries like:

  SELECT DISTINCT id FROM /Region where id='12345'

will always return an empty result regardless of whether a matching entry exists.

Solution

Customize serialization as illustrated in the example code given in the User's Guide.

Comments

Powered by Zendesk