Hi, I have a problem to create proper Affinity Key. I have numerous events per visitor in my cache, so my goal is to set VisitorId to be my affinity key, which is defined as composite key in the VisitorKey class and later on pass to the cacheConfiguration as cache Key. Cache is created, however cache key is empty and when I try to insert via JDBC it tells me that key is missing. I will appreciate any help.
public class VisitorKey { private final UUID eventId; @AffinityKeyMapped private final UUID visitorId; public VisitorKey(UUID eventId, UUID visitorId) { this.eventId = eventId; this.visitorId = visitorId; } public UUID getEventId() { return eventId; } public UUID getvisitorId() { return visitorId; } } public class Test { @QuerySqlField private UUID eventId; @QuerySqlField(index = true) private UUID visitorId; private transient VisitorKey key; public Test(UUID eventId, UUID visitorId) { this.eventId = eventId; this.visitorId = visitorId; } public VisitorKey getKey() { if (key == null) { key = new VisitorKey(eventId, visitorId); } return key; } public UUID getEventId() { return eventId; } public UUID getvisitorId() { return visitorId; } Ignition.ignite().getOrCreateCache(getCacheConfigurationTest()) private CacheConfiguration<VisitorKey, Test> getCacheConfigurationTest() { CacheConfiguration<VisitorKey, Test> cacheConfig = new CacheConfiguration<>("test"); cacheConfig.setCacheMode(CacheMode.PARTITIONED); cacheConfig.setAtomicityMode(CacheAtomicityMode.ATOMIC); cacheConfig.setSqlSchema(PUBLIC); cacheConfig.setBackups(BACKUP_FACTOR); cacheConfig.setAffinity(new RendezvousAffinityFunction(false, PARTITIONS_FACTOR)); return cacheConfig; } -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/