details: https://code.openbravo.com/erp/devel/pi/rev/e537a2c97bda changeset: 28852:e537a2c97bda user: Inigo Sanchez <inigo.sanchez <at> openbravo.com> date: Tue Apr 05 14:53:57 2016 +0200 summary: Fixed bug 32584: fetch method does not retrieves data with a non active entity
The problem here was that fetch method does not retrieves data with a non active entity. (e.g., if it is tried to obtain a non active organization). It is not take into account non active entities. Now, the issues has been fixed by adding setFilterOnActive(false); to take into account non active entities too. diffstat: modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java | 1 + src/org/openbravo/service/rest/DalWebService.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diffs (31 lines): diff -r e1b261c3f9d9 -r e537a2c97bda modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java --- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java Tue Apr 05 12:21:35 2016 +0200 +++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java Tue Apr 05 14:53:57 2016 +0200 @@ -136,6 +136,7 @@ final OBQuery<BaseOBObject> obq = OBDal.getInstance().createQuery(entityName, JsonConstants.ID + " = :bobId"); obq.setNamedParameter("bobId", id); + obq.setFilterOnActive(false); obq.setMaxResult(1); final BaseOBObject bob = obq.uniqueResult(); if (bob != null) { diff -r e1b261c3f9d9 -r e537a2c97bda src/org/openbravo/service/rest/DalWebService.java --- a/src/org/openbravo/service/rest/DalWebService.java Tue Apr 05 12:21:35 2016 +0200 +++ b/src/org/openbravo/service/rest/DalWebService.java Tue Apr 05 14:53:57 2016 +0200 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008-2015 Openbravo SLU + * All portions are Copyright (C) 2008-2016 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -233,6 +233,7 @@ final OBQuery<BaseOBObject> obq = OBDal.getInstance().createQuery(entityName, ID + " = :bobId"); obq.setNamedParameter("bobId", id); + obq.setFilterOnActive(false); obq.setMaxResult(1); final BaseOBObject result = obq.uniqueResult(); ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits