hi
I still have some confuse. If there are three cache like following.
Which cache will empCache collocate with? orgCache or comCache?
Since I don't see any other configuration in java example
org.apache.ignite.examples.binary.datagrid.CacheClientBinaryQueryExample
except @AffinityKeyMapped. Why EmployeeKey.organizationId map to
Organization.id but not any other class.
IgniteCache<Integer, Organization> orgCache
IgniteCache<Integer, Company> comCache
IgniteCache<EmployeeKey, Employee> empCache
public class EmployeeKey {
/** ID. */
private int id;
/** Organization ID. */
@AffinityKeyMapped
private int organizationId;
}
public class Organization {
/** */
private static final AtomicLong ID_GEN = new AtomicLong();
/** Organization ID (indexed). */
@QuerySqlField(index = true)
private Long id;
/** Organization name (indexed). */
@QuerySqlField(index = true)
private String name;
/** Address. */
private Address addr;
/** Type. */
private OrganizationType type;
/** Last update time. */
private Timestamp lastUpdated;
}
public class Company {
/** */
private static final AtomicLong ID_GEN = new AtomicLong();
/** Company ID (indexed). */
@QuerySqlField(index = true)
private Long id;
/** Company name (indexed). */
@QuerySqlField(index = true)
private String name;
}
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-does-AffinityKey-mapped-tp6260p6278.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.