ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ksenia Rybakova (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-4456) ODBC DML: add to doc some info on how to deal with complex affinity key and partitioned cache
Date Mon, 19 Dec 2016 13:46:58 GMT
Ksenia Rybakova created IGNITE-4456:
---------------------------------------

             Summary: ODBC DML: add to doc some info on how to deal with complex affinity
key and partitioned cache
                 Key: IGNITE-4456
                 URL: https://issues.apache.org/jira/browse/IGNITE-4456
             Project: Ignite
          Issue Type: Improvement
    Affects Versions: 1.8
            Reporter: Ksenia Rybakova


Example:
{code}
CacheConfiguration<AffinityKey<Long>, Person> personCacheCfg = new CacheConfiguration<>("Persons");
...
public AffinityKey<Long> key() {
        if (key == null)
            key = new AffinityKey<>(id, orgId);

        return key;
    }
{code}

Currently it's not obvious that in such a case we should:
1) Use QueryEntity to specify {{key}} and {{affKey}} as key fields as it's described in https://apacheignite.readme.io/docs/dml#section-custom-keys

2) Use {{key}} and {{affKey}} in statements directly instead of {{_key}}:
{code}
"INSERT INTO Person(key, affKey, firstName, lastName, resume, salary, orgId) 
                      VALUES (42, 2, 'Ivan', 'Ivanov', 'Ivan Ivanov has no degree', CAST(300
AS DOUBLE), 2)"
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message