diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-11 10:16:56 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-11 10:16:56 +0100 |
commit | d09682885106abdd7173656b9aeb8a945caafb06 (patch) | |
tree | 431a0e7abd650b9042430b950f651d7e539cf756 /wizards | |
parent | 660f7c59a0f4b8a21114c773a0651da7a6993554 (diff) |
db34c: #i108415# check if column exists
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/db/SQLQueryComposer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 966da2722ff0..967ed753e6df 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -239,11 +239,16 @@ public class SQLQueryComposer private PropertyValue[][] replaceConditionsByAlias(PropertyValue _filterconditions[][]) { + XColumnsSupplier columnSup = UnoRuntime.queryInterface(XColumnsSupplier.class, m_xQueryAnalyzer); + XNameAccess columns = columnSup.getColumns(); for (int n = 0; n < _filterconditions.length; n++) { for (int m = 0; m < _filterconditions[n].length; m++) { _filterconditions[n][m].Name = getComposedAliasFieldName(_filterconditions[n][m].Name); + final String aliasName = getComposedAliasFieldName(_filterconditions[n][m].Name); + if ( columns.hasByName(aliasName)) + _filterconditions[n][m].Name = aliasName; } } return _filterconditions; |