details:   https://code.openbravo.com/erp/devel/pi/rev/1582d1dc7250
changeset: 16460:1582d1dc7250
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Wed May 09 10:43:24 2012 +0200
summary:   fixed bug 20449, related to bug 20386

Revert original fix for #20386 as it causes #20449

diffstat:

 
modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
 |  22 ----------
 1 files changed, 0 insertions(+), 22 deletions(-)

diffs (47 lines):

diff -r c7f7afeb586c -r 1582d1dc7250 
modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
--- 
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
  Wed Apr 18 17:39:21 2012 +0200
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
  Wed May 09 10:43:24 2012 +0200
@@ -32,9 +32,7 @@
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.exception.OBSecurityException;
 import org.openbravo.base.model.Entity;
-import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
-import org.openbravo.base.model.domaintype.TableDomainType;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.dal.core.DalUtil;
@@ -42,8 +40,6 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
-import org.openbravo.model.ad.domain.Reference;
-import org.openbravo.model.ad.domain.ReferencedTable;
 import org.openbravo.service.db.DalConnectionProvider;
 
 /**
@@ -275,24 +271,6 @@
         return properties;
       }
       result = currentEntity.getProperty(part);
-
-      // Handling special case of Table reference: property is the one set in 
the reference itself
-      // instead of identifier
-      if (result.getDomainType() instanceof TableDomainType) {
-        final Reference reference = OBDal.getInstance().get(Reference.class,
-            result.getDomainType().getReference().getId());
-        for (ReferencedTable referencedTable : 
reference.getADReferencedTableList()) {
-          if (referencedTable.isActive() && 
referencedTable.getDisplayedColumn() != null
-              && referencedTable.getDisplayedColumn().isActive()) {
-            Entity refEntity = ModelProvider.getInstance().getEntityByTableId(
-                referencedTable.getTable().getId());
-            result = 
refEntity.getPropertyByColumnName(referencedTable.getDisplayedColumn()
-                .getDBColumnName());
-            break;
-          }
-        }
-      }
-
       properties.add(result);
       if (result.getTargetEntity() != null) {
         currentEntity = result.getTargetEntity();

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to