- 修复 未处理 Oracle DbFirst 虚拟列;#542

This commit is contained in:
2881099 2020-11-17 19:06:42 +08:00
parent c2f1b73755
commit c04a32659d
4 changed files with 4 additions and 4 deletions

View File

@ -197,7 +197,7 @@ nvl((select 1 from user_triggers where upper(trigger_name)=upper('{Utils.GetCsNa
b.comments b.comments
from all_tab_columns a from all_tab_columns a
left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name
where a.owner={{0}} and a.table_name={{1}}", tboldname ?? tbname); where a.owner={{0}} and a.table_name={{1}} and a.column_id is not null", tboldname ?? tbname);
var ds = _orm.Ado.ExecuteArray(CommandType.Text, sql); var ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
var tbstruct = ds.ToDictionary(a => string.Concat(a[0]), a => var tbstruct = ds.ToDictionary(a => string.Concat(a[0]), a =>
{ {

View File

@ -331,7 +331,7 @@ to_char(b.comments),
nvl(FREESQL_LONG_TO_CHAR_DEFAULT(a.table_name, a.column_name),'') nvl(FREESQL_LONG_TO_CHAR_DEFAULT(a.table_name, a.column_name),'')
from all_tab_cols a from all_tab_cols a
left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name
where {(ignoreCase ? "lower(a.owner)" : "a.owner")} in ({databaseIn}) and {loc8} where {(ignoreCase ? "lower(a.owner)" : "a.owner")} in ({databaseIn}) and {loc8} and a.column_id is not null
"; ";
ds = _orm.Ado.ExecuteArray(CommandType.Text, sql); ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
if (ds == null) return loc1; if (ds == null) return loc1;

View File

@ -198,7 +198,7 @@ nvl((select 1 from user_triggers where upper(trigger_name)=upper('{Utils.GetCsNa
b.comments b.comments
from all_tab_columns a from all_tab_columns a
left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name
where a.owner={{0}} and a.table_name={{1}}", tboldname ?? tbname); where a.owner={{0}} and a.table_name={{1}} and a.column_id is not null", tboldname ?? tbname);
var ds = _orm.Ado.ExecuteArray(CommandType.Text, sql); var ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
var tbstruct = ds.ToDictionary(a => string.Concat(a[0]), a => var tbstruct = ds.ToDictionary(a => string.Concat(a[0]), a =>
{ {

View File

@ -331,7 +331,7 @@ to_char(b.comments),
nvl(FREESQL_LONG_TO_CHAR_DEFAULT(a.table_name, a.column_name),'') nvl(FREESQL_LONG_TO_CHAR_DEFAULT(a.table_name, a.column_name),'')
from all_tab_cols a from all_tab_cols a
left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name left join all_col_comments b on b.owner = a.owner and b.table_name = a.table_name and b.column_name = a.column_name
where {(ignoreCase ? "lower(a.owner)" : "a.owner")} in ({databaseIn}) and {loc8} where {(ignoreCase ? "lower(a.owner)" : "a.owner")} in ({databaseIn}) and {loc8} and a.column_id is not null
"; ";
ds = _orm.Ado.ExecuteArray(CommandType.Text, sql); ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
if (ds == null) return loc1; if (ds == null) return loc1;