[ 
https://issues.apache.org/jira/browse/IGNITE-15263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maksim Timonin reassigned IGNITE-15263:
---------------------------------------

    Assignee: Maksim Timonin

> Setting name in QuerySqlField on affinity field broke affinity awareness in 
> sql.
> --------------------------------------------------------------------------------
>
>                 Key: IGNITE-15263
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15263
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.10
>            Reporter: Ivan Daschinsky
>            Assignee: Maksim Timonin
>            Priority: Major
>         Attachments: AffinityKeyTest.java
>
>
> If you set affinity key on sql indexed cache and set aliases to affinity 
> field, i.e. 
> {code:java}
> public static class PersonKey {
>         @QuerySqlField
>         public Integer id;
>         @QuerySqlField(name = "city_id") 
>         @AffinityKeyMapped
>         public Integer cityId;
>         public PersonKey(Integer id, Integer cityId) {
>             this.id = id;
>             this.cityId = cityId;
>         }
> }
> ....
> CacheConfiguration config = new CacheConfiguration<PersonKey, 
> Person>("person")
>                 .setIndexedTypes(PersonKey.class, Person.class)
>                 .setSqlSchema("PUBLIC")
>             );
> {code}
> {{affinityKeyColumn}} calulation fails in {{GridH2Table}} and simply not 
> works as expected.
> {{org.apache.ignite.internal.processors.query.QueryUtils#typeForQueryEntity}} 
> should be fixed to take into account
> aliases and set properly {{affinityKeyColumn}} in descriptor.
> Without aliases all works as expected.
> Reproducer of subj is attached.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to