Revision 46424
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ResultSetForSetProviderOperation.java | ||
---|---|---|
219 | 219 |
forcedColumns.remove(attr.getName()); |
220 | 220 |
} |
221 | 221 |
if (query != null && (query.hasGroupByColumns() || query.hasAggregateFunctions()) ) { |
222 |
String aggregate = query.getAggregate(this.table.getTable(), attr.getName()); |
|
223 |
if (this.query.isAGroupByColumn(attr.getName())) { |
|
224 |
select.column().name(attr.getName()); |
|
225 |
} else if (aggregate == null) { |
|
226 |
select.column().value(expbuilder.constant(null)).as(attr.getName()); |
|
222 |
String aggregate = query.getAggregate(this.table.getTable(), attr.getName()); |
|
223 |
if (aggregate == null) { |
|
224 |
if (this.query.isAGroupByColumn(attr.getName()) ) { |
|
225 |
select.column().name(attr.getName()); |
|
226 |
} else if (aggregate == null) { |
|
227 |
select.column().value(expbuilder.constant(null)).as(attr.getName()); |
|
228 |
} |
|
227 | 229 |
} else { |
228 | 230 |
select.column() |
229 | 231 |
.value(ExpressionUtils.compile(aggregate).toValue(expbuilder)) |
Also available in: Unified diff