Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization error while using nested generic record. [API-1960] #807

Open
emreyigit opened this issue Mar 15, 2023 · 2 comments
Open

Serialization error while using nested generic record. [API-1960] #807

emreyigit opened this issue Mar 15, 2023 · 2 comments
Labels
Jira Creates a corresp. Jira issue in the APIs project. Priority: High High Priority. Type: Defect Issue is a Defect ie a Bug that needs to be fixed.

Comments

@emreyigit
Copy link
Collaborator

When I try to put an generic record which has nested generic record to map, I get System.NotSupportedException : Not supported field kind: Compact. at Hazelcast.Serialization.SerializationService.WriteObject(ObjectDataOutput output, Object obj, Boolean isRootObject, Boolean withSchemas) in C:\Users\EmreYigit\Desktop\Projects\.net-client-forked\hazelcast-csharp-client\src\Hazelcast.Net\Serialization\SerializationService.ReadWrite.cs:line 284

To reproduce:
Modified the test at
Hazelcast.Tests.Serialization.Compact.GenericRecordTests.TestRemote with nested generic record.

        var rec1 = GenericRecordBuilder.Compact("rec1")
            .SetBoolean("bool", true)
            .Build();
        
        var rec0 = GenericRecordBuilder.Compact("rec0")
            .SetBoolean("bool", true)
            .SetInt32("int", 123)
            .SetString("string", "hello")
            .SetGenericRecord("rec1",rec1)
            .Build();
        
        var mapOfGenericRecord = await Client.GetMapAsync<int, IGenericRecord>("generic-record-map");        
        
        // can set the IGenericRecord value
        await mapOfGenericRecord.SetAsync(0, rec0);
@emreyigit emreyigit added Type: Defect Issue is a Defect ie a Bug that needs to be fixed. Priority: High High Priority. Jira Creates a corresp. Jira issue in the APIs project. labels Mar 15, 2023
@github-actions github-actions bot changed the title Serialization error while using nested generic record. Serialization error while using nested generic record. [API-1960] Mar 15, 2023
@github-actions
Copy link

Internal Jira issue: API-1960

@emreyigit emreyigit added this to the 5.3.0 milestone Mar 15, 2023
@emreyigit
Copy link
Collaborator Author

The solution should also cover #681. Generic record writes shouldn't allow the alternating type of schemas in arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Creates a corresp. Jira issue in the APIs project. Priority: High High Priority. Type: Defect Issue is a Defect ie a Bug that needs to be fixed.
Projects
None yet
Development

No branches or pull requests

1 participant