The columns_internal-Funktion uses a heuristic to detect the schema.
It divides the table-name by a dot. The prefix ist the schema, the suffix the table.
Then it looks its second argument up.
If its not null, the function will use it in stead of the extracted part.
(Maybe that other databases are different, We use oracle.)
This will be a problem. The second argument is always the connected
user, in oracle its the default schema. If your user has the right to access
a table in another schema, you can specify the name as a prefix in the
tablename.
set_table_name 'SCHEMA_NAME.TABLE_NAME'
The adapter overrides this explicit schema for this table with the
default schema of the user. And: It will not work anymore.
The commit: 58c7efa71c05ce6f0ac7289ed79e0f113d9c1921
In the Repository: git://github.com/jenshimmelreich/activerecord-jdbc-adapter.git
will solve the problem.
In 475067b.