ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerpic <jerome.pic...@misterfly.com>
Subject Deserializing to an object from a request based on SqlQueryField.
Date Wed, 15 Nov 2017 13:03:51 GMT
Hi All,

I’m facing a problem to get the object from a query based on SqlQueryField.
Let me give you an example.

The type of the field A is : string
The type of the field B is : CustomizedObject with its own structure.

In the table STRUCTURE we can see that B has been correctly serialized. The
problem is when I try with the followed request to retrieve B I don’t obtain
the deserialized value of my object, I got a new structure composed with 2
fields (an array (with the pseudo object) and a raw field).

So my question is how can I deserialzed the value of the field in order to
get the real original object?

Any help would be very much appreciated.


Here is the request :

string select = "SELECT A, B  " +
	 "FROM \"" + CACHE + "\".STRUCTURE ";

var fieldsQuery = new SqlFieldsQuery(select);
fieldsQuery.EnableDistributedJoins = true;

var res = cacheOneWayProposals.QueryFields(fieldsQuery).GetAll();

foreach(var row in res)
string A = row[0].ToString();
var B = row[1];


Sent from: http://apache-ignite-users.70518.x6.nabble.com/

View raw message