Hello!

I don't think we support multiple affinity fields yet.

You will need to create a synthetic field, which you will keep populated
with all affinity columns' values, and declare it as affinity field.

Regards,
-- 
Ilya Kasnacheev


сб, 18 янв. 2020 г. в 15:28, narges saleh <[email protected]>:

> Hi All,
>
> I understand that CacheKeyConfiguration is defined at ignite configuration
> level. That being the case, how do you tie the affinity key to a particular
> cache, within the XML config file?
> The following code snippet shows how to do in java code.
>
>   CacheConfiguration<PersonKey, Person> personCfg = new 
> CacheConfiguration<PersonKey, Person>("persons");
>
>     //configure the affinity key
>     personCfg.setKeyConfiguration(new CacheKeyConfiguration("Person", 
> "companyId"));
>
> Also, how do you define an affinity key with multiple fields, using 
> CacheKeyConfiguration, say SSN and company id are both part of the affinity 
> key.
>
> thanks.
>
>

Reply via email to