related to issue 41530: fixed comparison
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 08 Aug 2019 11:42:05 +0200
changeset 36426 a4ac557d0271
parent 36425 89ffba6ba6bf
child 36427 302bd81b609d
related to issue 41530: fixed comparison
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/HQLDataSourceService.java
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/HQLDataSourceService.java	Wed Jul 31 12:46:44 2019 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/HQLDataSourceService.java	Thu Aug 08 11:42:05 2019 +0200
@@ -217,7 +217,7 @@
           // Aliases should be properly set in HQL, column name can be used only as fallback in case
           // alias is not set or it does not match any actual property. Even in this case it will
           // only work in case columns in HQL are in the same order as defined by AD_Column.seqNo.
-          String columnName = columns.size() < i ? columns.get(i).getDBColumnName() : null;
+          String columnName = columns.size() > i ? columns.get(i).getDBColumnName() : null;
 
           String propertyName = getPropertyName(entity, alias, columnName);
           record.put(propertyName, alias != null ? tuple.get(alias) : tuple.get(i));