You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Mikhail Petrov <pm...@gmail.com> on 2020/10/12 20:37:45 UTC

Usage of BinaryObject in Spring Data Queries

Manuel Nunez, Ilya Kasnacheev,

I'm working on the support of thin clients for ignite spring data 
integration. And I faced that in method 
IgniteRepositoryQuery#rowToEntity that was introduced by ticket [1], 
BinaryObject is used to create cache value class from SQL result row and 
to determine class fields.

Could you clarify why this particular way was chosen?

At first glance, the same result can be achieved using 
FieldsQueryCursor#getFieldName and fields of cache value class obtained 
merely through reflection. It seems that it can help to avoid 
unnecessary serialization while BinaryObject building and avoid using 
node-specific methods (such as QueryCursorEx#fieldsMeta, 
IgniteConfiguration#getClassLoader, and so on). As a result, it can also 
make it possible to reuse spring data query logic with a thin client 
without code duplication.

WDYT?

[1] https://issues.apache.org/jira/browse/IGNITE-13005