There is a way to map fields of entity to a SQL query field's name through the @QuerySqlField(name="") annotation, but I couldn't find a way to define it in an XML file.
for example I have SQL: Select NAME_, VAL_ from PropertyEntity but PropertyEntity have name and value fields
I found Cache type metadata setting, but I can't find mapping.
UPD: I found keyFields property into CacheTypeMetadata. I think it maybe what I'm looking for
There is already an issue in Jira for that: https://issues.apache.org/jira/browse/IGNITE-1036
I think it must be fixed pretty soon.