Revision 47787 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/SelectFunction.java
SelectFunction.java | ||
---|---|---|
354 | 354 |
// return featureType; |
355 | 355 |
// }; |
356 | 356 |
// } |
357 |
final SQLBuilder.TableNameBuilder builderTable = sqlBuilder.select().from().table(); |
|
358 |
|
|
357 | 359 |
SQLBuilder.SelectBuilder select = sqlBuilder.createSelectBuilder(); |
358 | 360 |
String builderTableName = (String) builder.getProperty(SQLBuilder.PROP_TABLENAME); |
359 | 361 |
|
... | ... | |
411 | 413 |
} |
412 | 414 |
|
413 | 415 |
SQLBuilder.TableNameBuilder table = select.from().table(); |
416 |
if( !table.has_schema() && builderTable.has_schema() ) { |
|
417 |
table.schema(builderTable.getSchema()); |
|
418 |
} |
|
414 | 419 |
String tableName = table.getName(); |
415 | 420 |
FeatureType featureType; |
416 | 421 |
if (StringUtils.equalsIgnoreCase(builderTableName, tableName)) { |
... | ... | |
522 | 527 |
SQLBuilder.Column c = (SQLBuilder.Column) value; |
523 | 528 |
SQLBuilder.TableNameBuilder t = c.table(); |
524 | 529 |
if( t==null ) { |
525 |
c.table(table); |
|
530 |
if( table.featureType().get(c.name())!=null ) { |
|
531 |
c.table(table); |
|
532 |
} |
|
526 | 533 |
return; |
527 | 534 |
} |
528 | 535 |
if( t.equals(table) ) { |
Also available in: Unified diff