ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergi Vladykin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2906) Embedded / child element types indexing/queryfields (non-flat)
Date Tue, 29 Mar 2016 14:29:25 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15216087#comment-15216087
] 

Sergi Vladykin commented on IGNITE-2906:
----------------------------------------

For the issue you've described you can use @QuerySqlField(name = "unique_id") annotation.
Probably the issue description is wrong.
Also you should provide respective unit tests in your patch.

> Embedded / child element types indexing/queryfields (non-flat)
> --------------------------------------------------------------
>
>                 Key: IGNITE-2906
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2906
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache, data structures, general, SQL
>            Reporter: Krome Plasma
>         Attachments: indexing.patch
>
>
> I've had discussion about this on Apache Ignite Users.
> http://apache-ignite-users.70518.x6.nabble.com/Indexing-Querying-of-child-element-fields-td1704.html#a1734
> The problem occurs when you want to index a non-primitive type that have same names of
variables as the enclosing type, better described on forum above. As a short example:
> Let's say we want to index:
> public class Person
> {
>  @QuerySqlField 
>  long id;
>  @QuerySqlField 
>  PersonData personData;
> }
> public class PersonData
> {
>  @QuerySqlField 
>  long id;
> }
> This will not work as it will detect indexes/query fields with same names for index Person.id
and PersonData.id because the names are flattened to simply 'id'.
> I am attaching a simple patch that resolves this issue. We've been running this for (3
months now) and found no problems. However we are using annotations and not XML. I am not
sure the patch completely solves the problem for XML based configuration.



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

Mime
View raw message