thank you Pavel. It helped. I added
"IgniteConfiguration.BinaryConfiguration.Serializer
= new BinaryReflectiveSerializer { ForceTimestamp = true }" into config and
removed attribute and it works correctly.вт, 4 сент. 2018 г., 9:35 Pavel Tupitsyn <[email protected]>: > Hi Som, > > The issue here is that Ignite writes DateTime in an internal format when > [QuerySqlField] attribute is not present, to handle non-UTC values [1]. > This internal format is not SQL-compatible. > > There are multiple options to enforce TIMESTAMP format: > * Implement IBinarizable > * Implement IBinarySerializer > * Set IgniteConfiguration.BinaryConfiguration.Serializer = new > BinaryReflectiveSerializer { ForceTimestamp = true } > > The last one enforces TIMESTAMP format globally, and requires all DateTime > values to be of DateTimeKind.Utc > (which is actually a good practice for persisting date and time). > > Thanks, > Pavel > > [1] > https://apacheignite-net.readme.io/docs/sql-queries#section-java-type-name-mapping > > On Mon, Sep 3, 2018 at 7:10 PM Som Som <[email protected]> wrote: > >> I’m connecting to the server node via DBeaver (connection settings\ jdbc >> url - jdbc:ignite:thin://xxx.xx.xx.xx/). I can query DateTime field if I >> use Attributes Based Configuration and I get an error mentioned below in >> case of using QueryEntity Based Configuration. How to configure a cache >> with QueryEntity Based Configuration in .net in order to read DateTime via >> jdbc. >> >> >> >> пн, 3 сент. 2018 г., 17:53 Igor Sapego <[email protected]>: >> >>> Which exactly ODBC driver are you talking about? >>> >>> Best Regards, >>> Igor >>> >>> >>> On Mon, Sep 3, 2018 at 4:48 PM wt <[email protected]> wrote: >>> >>>> not sure if it helps but the odbc driver doesnt play nice with date >>>> fields >>>> and deals with them in binary format >>>> >>>> class org.apache.ignite.binary.BinaryInvalidTypeException >>>> >>>> your error looks to be related - have you tried the jdbc driver as a >>>> test? >>>> >>>> >>>> >>>> -- >>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >>>> >>>
