You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "dhaval gupta (JIRA)" <ji...@apache.org> on 2015/01/03 09:05:34 UTC

[jira] [Commented] (OLINGO-491) Query formed has all attributes of JPA entity instead of the selected attributes provided by $select system query option

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

dhaval gupta commented on OLINGO-491:
-------------------------------------

This is the problem :

 In JPQLSelectSingleContext class there is one inner class JPQLSelectSingleContext Builder in which there is build method.

 build (){
setJPAEntityName(entityType.getName());
setSelectExpression(generateSelectExpression());

}

generateSelectExpression(){

return getJPAEntityAlias();- Here is the problem , it just returns the alias and not the selected expression.Instead it should use the parsetToJPaSelectExpression() method of the ODataExpressionParser class.
}

This should fix the problem. Please fix this problem in other similar classes.

Thanks.
Dhaval

> Query formed has all attributes of JPA entity instead of the selected attributes provided by $select system query option
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OLINGO-491
>                 URL: https://issues.apache.org/jira/browse/OLINGO-491
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>            Reporter: dhaval gupta
>            Assignee: Chandan V.A
>
> Query formed has all attributes of JPA entity instead of the selected attributes provided by $select system query option.
> For ex :
> Suppose we have entity Issue in which there are 20 attributes. Now I select 2 attributes out of those 20 by $select=assetCode, IdIsin but the query that is executed by JPA is having all the 20 attributes in the query .
> Thanks
> Dhaval



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