Hello! At the compilation time it is impossible to know result type of the SqlFieldsQuery. So you can try following: ((ContinuousQuery)q).setInitialQuery(new SqlFieldsQuery("select _val from table"));
Thanks, Pavel 2018-03-20 20:43 GMT+03:00 au.fp2018 <au.fp2...@gmail.com>: > Hello All, > > I'm trying to setup a ContinuousQuery to retrieve _VAL objects from the > cache. So I tried using the SqlQuery but unfortunately I get the following > error: > > Only queries starting with 'SELECT *' and 'SELECT alias.*' are > supported > (rewrite your query or use SqlFieldsQuery instead): select _VAL from > "test"."TEST" where test_id=? > > If I convert the query to SqlFieldsQuery then the return type does not > match > the type expected by the setInitalQuery() method: > > contQuery.setInitialQuery(initQueryUsingSqlFieldsQuery); // <-- > doesn't compile > > Is there an example of using SqlFieldsQuery as the InitialQuery? > How else can I retrieve the initial snapshot using SQL, when I need the > fully deserialzed _VAL object? > > Thanks, > AU > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > -- Regards Pavel Vinokurov