Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036624 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2017-08-08 11:28 | 2017-08-09 14:37 | |||
Reporter | JONHM | View Status | public | |||||
Assigned To | platform | |||||||
Priority | high | Resolution | open | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036624: Error thrown in web services if the URL includes a where parameter that references a computed column | |||||||
Description | The following error is thrown when trying to get data from an entity filtering from a computed column: {"response":{"data":[{"response":{"status":-1,"error":{"message":"could not execute query using scroll","messageType":"Error","title":""},"totalRows":0}} | |||||||
Steps To Reproduce | Using Postman: - GET: https://livebuilds.openbravo.com/erp_pi_pgsql/org.openbravo.service.json.jsonrest/FinancialMgmtPeriod?_where=status='P' [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0098452) caristu (developer) 2017-08-09 14:12 edited on: 2017-08-09 14:38 |
Since MP27, when working with HQL (i.e. OBQuery) computed columns cannot be directly accessed as they are not properties of the entity[1]. Web services are internally making use of an OBQuery to return the results. Besides as stated here[2], the _where parameter should contain a valid HQL where-clause. Therefore to filter the result of a Web Service based on a compute column, using the _where parameter, then the "_computedColumns" property must be used. So, in this case the correct URL for the GET request will be: https://livebuilds.openbravo.com/erp_pi_pgsql/org.openbravo.service.json.jsonrest/FinancialMgmtPeriod?_where=_computedColumns.status='P' [^] [1] http://wiki.openbravo.com/wiki/How_to_create_a_Computed_Column#Limitations [^] [2] http://wiki.openbravo.com/wiki/JSON_REST_Web_Services#GET [^] |
(0098456) caristu (developer) 2017-08-09 14:23 edited on: 2017-08-09 14:44 |
Updated wiki pages: http://wiki.openbravo.com/wiki/JSON_REST_Web_Services#GET [^] http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/Concepts/XML_REST_Web_Services#Query_Request_and_Response [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2017-08-08 11:28 | JONHM | New Issue | |
2017-08-08 11:28 | JONHM | Assigned To | => platform |
2017-08-08 11:28 | JONHM | Modules | => Core |
2017-08-08 11:28 | JONHM | Resolution time | => 1503957600 |
2017-08-08 11:28 | JONHM | Triggers an Emergency Pack | => No |
2017-08-08 11:28 | JONHM | Relationship added | related to 0025773 |
2017-08-09 14:04 | caristu | Relationship added | related to 0024104 |
2017-08-09 14:06 | caristu | Summary | Error thrown in web services if the request includes a field that references a computed column => Error thrown in web services if the URL includes a where clause that references a computed column |
2017-08-09 14:12 | caristu | Review Assigned To | => caristu |
2017-08-09 14:12 | caristu | Note Added: 0098452 | |
2017-08-09 14:12 | caristu | Status | new => closed |
2017-08-09 14:13 | caristu | Summary | Error thrown in web services if the URL includes a where clause that references a computed column => Error thrown in JSON web services if the URL includes a where clause that references a computed column |
2017-08-09 14:13 | caristu | Summary | Error thrown in JSON web services if the URL includes a where clause that references a computed column => Error thrown in JSON web services if the URL includes a where parameter that references a computed column |
2017-08-09 14:14 | caristu | Note Edited: 0098452 | View Revisions |
2017-08-09 14:23 | caristu | Note Added: 0098456 | |
2017-08-09 14:37 | caristu | Summary | Error thrown in JSON web services if the URL includes a where parameter that references a computed column => Error thrown in web services if the URL includes a where parameter that references a computed column |
2017-08-09 14:38 | caristu | Note Edited: 0098452 | View Revisions |
2017-08-09 14:38 | caristu | Note Edited: 0098452 | View Revisions |
2017-08-09 14:44 | caristu | Note Edited: 0098456 | View Revisions |
Copyright © 2000 - 2009 MantisBT Group |