Hi, Please properly subscribe to the mailing list so that the community can receive email notifications for your messages. To subscribe, send empty email to [email protected] and follow simple instructions in the reply.
Artёm Basov wrote > Lets take example from > https://apacheignite.readme.io/docs/affinity-collocation > <https://apacheignite.readme.io/docs/affinity-collocation> > with Person, Company and PersonKey classes. > > Lets say i want to remove persons by their ids (cache.removeAll(...)) but > since i don't know companyId i can't create proper PersonKey. > > Is there a better way, than this: > QueryCursor > <PersonKey> > cursor = personCache.query(new ScanQuery<PersonKey, Person>((k, v) > -> k.getPersonId().equals("myPersonId1")), Cache.Entry::getKey); > personCache.removeAll(new HashSet<>(cursor.getAll())); You can use SQL DELETE for this: https://apacheignite.readme.io/docs/dml -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-operate-with-cache-Key-or-cache-AffinityKey-tp13561p13576.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
