If I have something like:
class HouseKey {
@QuerySqlField(index = true)
Long id
@AffinityKeyMapped
@QuerySqlField
Short ownerId
}
and
class CarKey {
@QuerySqlField(index = true)
Long id
@AffinityKeyMapped
@QuerySqlField
Short ownerId
}
and define my caches like
cacheConfiguration.setIndexedTypes(HouseKey, House)
cacheConfiguration.setIndexedTypes(CarKey, Car)
is that enough to ensure new Cars and Houses are stored on the same
nodes if their ownerIds are the same?
Or do I need to create an Owner class with ownerId field and store it first?