Hi Alexey,

This is not a bug.

There are two serialization mechanisms in Ignite.NET:
1) Ignite binary serialization. It _requires_ types to be registered in
BinaryConfiguration. SQL only works with this one.
2) .NET BinaryFormatter, which works with [Serializable] types. This does
not require BinaryConfiguration, but does not allow SQL.

You have [Serializable] class. When you don't register it in
BinaryConfiguration, (2) is used and SQL does not work.
When you do register it, (1) is used and SQL works.

If you intend to use Ignite serialization, remove [Serializable] from your
class to make sure that (2) is not used.
This will give you an error for unregistered types.

Pavel.

On Wed, Aug 24, 2016 at 10:46 AM, exones <[email protected]>
wrote:

> Hello all,
>
> I tried to run SQL queries (Ignite.NET) against Ignite cache with the
> following cache and serialization configuration (as documentation states
> queries only work with the native Ignite binary serializer), but noticed
> some weird behavior.
>
> -- PROBLEM --
>
> With DefaultSerializer (BinaryConfiguration section) set to
> BinaryReflectiveSerializer and no other configuration for particular types
> made, all cache queries return 0 results. But when I explicitly set the
> BinaryTypeConfiguration for my Thing class (uncomment the commented lines
> below) -- it starts working and correctly returns queried entries as I
> would
> expect from the beginning.
>
> For me this behavior is a bug as I would assume that setting
> DefaultSerializer must lead to all types being serialized with it by
> default
> (hence the name). But it appears that I still have to do it explicitly for
> all the types I want to query against. Below is my setup.
>
> -- Configuration --
>
>
> -- Cached class --
>
> Here's the Thing class: [Serializable]
> public class Thing
>
> -- Query --
>
> And here's how I run queries:
>
>
>
> Thank you!
>
>  Alexey Larchenko
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/No-cache-SQL-queries-possible-with-
> Default-Serializer-set-to-BinaryReflectiveSerializer-tp7262.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to