Hello,
You can to use both key with affinity part.
For example:
public class cache1Key {
private int uniqueId1;
@AffinityKeyMapped
private int DEV_LV;
}
public class cache2Key {
private int uniqueId2;
@AffinityKeyMapped
private int DEV_LV;
}
On Wed, Jul 13, 2016 at 4:48 PM, November <[email protected]> wrote:
> Thanks for reply
>
> I have another question. There are two tables.
>
> CREATE TABLE T1
> ( LAT_ID SMALLINT,
> DEV_ID VARCHAR(20),
> DEV_LV SMALLINT
> );
>
> CREATE TABLE T2
> ( THE_DATE DATE,
> DEV_ID VARCHAR(20),
> DEV_LV SMALLINT
> );
>
> SQL query:
> SELECT t1.* from t1, t2 where t2.DEV_LV = t1.DEV_LV
>
> I use cache1<cache1Key, cache1Value> and cache2<Integer, cache2Value> (use
> DEV_LV as key) to store it.
>
> public class cache1Key {
> private int DEV_LV;
>
> /** Organization ID. */
> @AffinityKeyMapped
> private int cache2_DEV_LV;
> }
>
> What if there are repeat DEV_LV in both tables(but the cache's key need to
> be unique) ? Is there any other way to achieve collocate using
> @AffinityKeyMapped?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/How-does-AffinityKey-mapped-tp6260p6275.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--
Vladislav Pyatkov