Re: Basic Affinity Question

2020-05-14 Thread Stephen Darlington
No, it needs to be able to determine which node the data should be on without reference to anything else. This means that you’d need company-id in your address table. > On 13 May 2020, at 21:23, narges saleh wrote: > >  > My other question is whether affinity is transitive. > Company (primar

Re: Basic Affinity Question

2020-05-13 Thread narges saleh
My other question is whether affinity is transitive. Company (primary key: company-id) Employee(primary key: employee-id + company-id) <- company id = affinity key Address(Primary key: address-id + employee -id) <- employee id = affinity key Would the records related company, employee and address

Re: Basic Affinity Question

2020-05-13 Thread narges saleh
Thanks. If I try AffinityRun with collection of caches and the affinity key, I'd get NPE with cache.localpeek using the primary key of the dependent cache/table but the cache query itself succeeds. Is there a working example? On Wed, May 13, 2020 at 8:10 AM Stephen Darlington < stephen.darling...@

Re: Basic Affinity Question

2020-05-13 Thread Stephen Darlington
Yes, but you also need to make sure you use the correct affinityRun method. There’s one where you specify multiple caches and you need to use that one. > On 13 May 2020, at 12:50, narges saleh wrote: > > Hi All, > If I have these two caches/tables defined via query entities, in a config > fil

Basic Affinity Question

2020-05-13 Thread narges saleh
Hi All, If I have these two caches/tables defined via query entities, in a config file, Employee (partitioned) employee-id company-id name primary key(employee-id, company-id), affinity(company-id) Company (partitioned) company-id. name primary key(company-id) If I do AffinityRun or