details:   https://code.openbravo.com/erp/devel/pi/rev/e624a8506d55
changeset: 24101:e624a8506d55
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Tue Jul 22 17:55:48 2014 +0530
summary:   Related to issue 26696 : Display column is computed only for table 
ref and not tableDir ref.

diffstat:

 
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
 |  12 +++++----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r a1bf5514b421 -r e624a8506d55 
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
--- 
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
       Tue Jul 22 12:29:37 2014 +0200
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
       Tue Jul 22 17:55:48 2014 +0530
@@ -637,9 +637,9 @@
         clause = getMainAlias() + DalUtil.DOT
             + useFieldName.replace(DalUtil.DOT + JsonConstants.IDENTIFIER, "");
       } else {
-        if (subEntity != null) {
-          final Property refProperty = this.distinctProperty;
-          tableReference = refProperty.getDomainType() instanceof 
TableDomainType;
+        final Property refProperty = this.distinctProperty;
+        tableReference = refProperty.getDomainType() instanceof 
TableDomainType;
+        if (subEntity != null && tableReference) {
           final boolean isTable = property.getEntity() == 
ModelProvider.getInstance().getEntity(
               Table.ENTITY_NAME);
           if (isTable) {
@@ -1415,8 +1415,10 @@
       boolean tableReference = false;
       if (originalProp == null) {
         if (distinctProperty != null) {
-          tableReference = true;
-          originalProp = distinctProperty;
+          tableReference = distinctProperty.getDomainType() instanceof 
TableDomainType;
+          if (tableReference) {
+            originalProp = distinctProperty;
+          }
         }
       } else {
         tableReference = originalProp.getDomainType() instanceof 
TableDomainType;

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to