Hello! Why do you try to store List<BinaryObject> in cache? It should work if you will just put plain BinaryObject's in it without List<>.
Regards, -- Ilya Kasnacheev 2018-07-18 17:42 GMT+03:00 debashissinha <debashissi...@gmail.com>: > Hi , > > If I add a List<BinaryObject> to cache and also in the cache configuration > I > set QueryEntity with fields, then how can I query using > cache.query(new SqlFieldQuery("Some sql")); > > Sample I am trying to use is > > CacheConfiguration<Integer,List<BinaryObject>> cfg = new > CacheConfiguration(); > cfg.setQueryEntities(new ArrayList<QueryEntity>(){{ > > e.setKeyType("java.lang.Integer"); > e.setValueType("Person"); > e.setFields(new LinkedHashMap<String,String>(){{ > > put("id","java.lang.Integer"); > put("name","java.lang.String"); > > }}); > add(e); > }}); > > cfg.setName("TESTPERSON"); > > Ignite ignite = Ignition.start(); > IgniteCache<Integer,List<BinaryObject>> cache = > ignite.getOrCreateCache(cfg).withKeepBinary(); > > List<BinaryObject> binaryObjectList = new ArrayList<BinaryObject>(); > IgniteBinary binary = binary.builder("Person"); > > bldr.setField("id",1); > bldr.setField("name","test"); > binaryObjectList.add(bldr.build()); > > cache.put(1,binaryObjectList); > > QueryCursor<List<?>> cursor = cache.query(new SqlFieldsQuery("Select * > from Person")); > > Am getting empty results here. > Can some one kindly help . > > Thanks in advance. > Debashis Sinha > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >