You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "kcheng.mvp" <kc...@gmail.com> on 2018/09/19 02:44:30 UTC

Re: SQL SELECT with AffinityKeyMapped - no results

I ran into the same issue. if we can not use @AffinityKeyMapped without any
workaround. then Can I use AffinityKey as the document address


Object personKey1 = new AffinityKey("myPersonId1", "myCompanyId");
Object personKey2 = new AffinityKey("myPersonId2", "myCompanyId");
 
Person p1 = new Person(personKey1, ...);
Person p2 = new Person(personKey2, ...);
 
// Both, the company and the person objects will be cached on the same node.
comCache.put("myCompanyId", new Company(..));
perCache.put(personKey1, p1);
perCache.put(personKey2, p2);



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/