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

Krome Plasma commented on IGNITE-2906:
--------------------------------------

class ClassA
{
 @QuerySqlField (name = "clash")
 int a;
}

class ClassB
{
 @QuerySqlField
 ClassA first;
 
 @QuerySqlField
 ClassA second;
}

This would not work either.

> 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)

Reply via email to