Skip to content

Commit 795e444

Browse files
Fixed bug with invisible columns found in tables referenced by an object
type name with %ROWTYPE (#325).
1 parent bf369c8 commit 795e444

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ oracledb 2.2.0 (TBD)
1717
Thin Mode Changes
1818
+++++++++++++++++
1919

20+
#) Fixed bug in handling invisible columns with object type names containing
21+
``%ROWTYPE``
22+
(`issue 325 <https://github.com/oracle/python-oracledb/issues/325>`__).
2023
#) Internal change: further efforts to tighten code looking for the end of a
2124
database request made to Oracle Database 23c.
2225

src/oracledb/impl/thin/dbobject_cache.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ cdef str DBO_CACHE_SQL_GET_COLUMNS = """
8080
end,
8181
nvl(data_precision, 0),
8282
nvl(data_scale, 0)
83-
from all_tab_columns
83+
from all_tab_cols
8484
where owner = :owner
8585
and table_name = substr(:name, 1, length(:name) - 8)
86+
and hidden_column != 'YES'
8687
order by column_id"""
8788

8889
cdef str DBO_CACHE_SQL_GET_ELEM_TYPE_WITH_PACKAGE = """

tests/sql/create_schema.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ create table &main_user..TestAllTypes (
347347
NCLOBValue nclob,
348348
BLOBValue blob,
349349
SubObjectValue &main_user..udt_SubObject,
350-
SubObjectArray &main_user..udt_ObjectArray
350+
SubObjectArray &main_user..udt_ObjectArray,
351+
InvisibleValue number invisible
351352
)
352353
/
353354

0 commit comments

Comments
 (0)