You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2015/05/04 07:35:05 UTC
[jira] [Assigned] (OLINGO-644) JPA Processor loose order by
mutliple sort criteria
[ https://issues.apache.org/jira/browse/OLINGO-644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chandan V.A reassigned OLINGO-644:
----------------------------------
Assignee: Chandan V.A
> JPA Processor loose order by mutliple sort criteria
> ---------------------------------------------------
>
> Key: OLINGO-644
> URL: https://issues.apache.org/jira/browse/OLINGO-644
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 2.0.3
> Reporter: Christian Wilhelm
> Assignee: Chandan V.A
>
> Hi Colleagues,
> We want to sort a table regarding 3 different columns. The sort priority is of course important, but it does not work as expected.
> First Example „Read Raw Materials“:
> Within the Chrome-Debugger you can see that the GET is called in the right way:
>
> On the other hand the SQL Tracing on the Server looks like this:
> SELECT UUID, ASSIGNEDCR, COMPLETEDCR, MISSING_REQ_DATA, NOT_COMPLIANT_REQS, PRIORITY, RAW_MATERIAL_ID, RAWMATERIAL_NAME, RESPONSIBLE_USER_GROUP_UUID, USED_IN_PRODUCTS FROM MONITORRAWMATERIAL
> ORDER BY PRIORITY DESC, USED_IN_PRODUCTS DESC, RAWMATERIAL_NAME
> Order Prio Call from Frontend (GET) SQL Call in JPA
> ----------------------------------------------------------------------------
> 1. RawMaterialName PRIORITY
> 2. UsedInProducts USED_IN_PRODUCTS
> 3. Priority RAWMATERIAL_NAME
> A Second Example shows the following Order Prio:
> Summary:
> Order Prio Call from Frontend (GET) SQL Call in JPA
> ----------------------------------------------------------------
> 1. ProductName PRODUCT_NAME
> 2. InworkCR PRIORITY
> 3. Priority INWORKCR
> Found Debugging Information:
> Debugging the OData-Source provides following information for us:
> • In the Class ODataExpressionParser and function parseToJPAOrderByExpression() the (still sorted) orderByExpression is stored in the orderByMap.
> • In the Class JPQLSelectStatementBuilder and function createJPQLQuery() the hash map is read by iterator (=> unsorted).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)