Cache mode is partitioned.
I have three objects: Area, Organization and Employee and codes as the
following.

*Code:*
public class Area implements Serializable {
    private int id;
        private String name;
...     
}

public class Organization implements Serializable {
    private iint id;
        private String name;
...     
}

public class Employee implements Serializable {
    private int id;
        private String name;
...     
}


The first level collocation class is easy to do like:

public class OrganizationKey {
    /** ID. */
    private int areaId;

    /** Organization ID. */
    @AffinityKeyMapped
    private int organizationId;
        
}


Then I want to collocate the Employee with the Organization, I am not sure
which one should be the AffinityKeyMapped field, OrganizationKey or
organizationId ?  

public class EmployeeKey {
    private int id;
    /** ID. */

    /** Organization ID. */
    @AffinityKeyMapped
    private int organizationId;
        
}

or 

public class EmployeeKey {
    private int employeeId;
    /** ID. */

    /** Organization key. */
    @AffinityKeyMapped
    private OrganizationKey organizationkey;
        
}

thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to