Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029428
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformminoralways2015-03-24 10:012015-07-02 08:52
ReportercaristuView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q1.3
StatusclosedFix in branchFixed in SCM revisionb1547740b5a2
ProjectionnoneETAnoneTarget Version3.0PR15Q1.3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR14Q2.6SCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029428: Distinct parameter is not working in JSON REST web services

DescriptionDistinct parameter is not working in JSON REST web services. An error like the following is thrown when using it:

{"response":{"data":[{"response":{"status":-1,"error":{"message":"Exception when creating query select me from Product as me where ( exists (select 1 from Product inner join null.organization as i where i = me and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')) )order by me.name","messageType":"Error","title":""},"totalRows":0}}
Steps To Reproduce1) Do the following web service call

https://livebuilds.openbravo.com/erp_pi_pgsql/org.openbravo.service.json.jsonrest/Product?_distinct=organization [^]

Notice that the error is returned
TagsApproved
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0029385 closedalostale Distinct parameter is not working in JSON REST web services 

-  Notes
(0076347)
hgbot (developer)
2015-04-07 08:28

Repository: erp/backports/3.0PR15Q1.3
Changeset: b1547740b5a2f3b8bff919777134ff7bf68fa9d2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 26 15:21:18 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/b1547740b5a2f3b8bff919777134ff7bf68fa9d2 [^]

fixed bug 29428: Distinct parameter is not working in JSON REST web services

  Using _distinct property in JSON REST webservices resulted in an incorrectly
  generated query. There were 2 problems:

   - Entity name for was set in the fetch method, after the refactor done to fix
     issue 0025182, entity is different in case of using _distinct, and it is managed
     by QueryService.
   - This refactor also requires of using aliases to work

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonRestServlet.java
---
(0076388)
AugustoMauch (developer)
2015-04-08 18:30

Code reviewed and verified in [1]@eda5123f66b0

[1] https://code.openbravo.com/erp/backports/3.0PR15Q1.3/ [^]

- Issue History
Date Modified Username Field Change
2015-03-26 12:01 alostale Type defect => backport
2015-03-26 12:01 alostale Target Version => 3.0PR15Q1.3
2015-03-26 15:38 dmitry_mezentsev Tag Attached: Approved
2015-04-07 08:01 alostale Review Assigned To => AugustoMauch
2015-04-07 08:28 hgbot Checkin
2015-04-07 08:28 hgbot Note Added: 0076347
2015-04-07 08:28 hgbot Status scheduled => resolved
2015-04-07 08:28 hgbot Resolution open => fixed
2015-04-07 08:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/b1547740b5a2f3b8bff919777134ff7bf68fa9d2 [^]
2015-04-08 18:30 AugustoMauch Note Added: 0076388
2015-04-08 18:30 AugustoMauch Status resolved => closed
2015-04-08 18:30 AugustoMauch Fixed in Version => 3.0PR15Q1.3
2015-07-02 08:52 alostale Assigned To platform => alostale


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker