You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is only one schema in Oracle database - everything is OK. Problems comes when there are multiple schemas with the same tables: when I try to insert data I get error: SQLSTATE[HY000]: General error: 957 OCIStmtExecute: ORA-00957: duplicate column name
In the db log file I see that phalcon tries to get table columns from ALL_TABLES, ALL_TAB_COLUMNS, ALL_CONS_COLUMNS without filtering owner, just by table name.
Setting up schema name in configuration made no difference, so I set schema directly in Model:
PHP Version: 5.5.12, Phalcon: 2.0.8, Oracle: 10
When there is only one schema in Oracle database - everything is OK. Problems comes when there are multiple schemas with the same tables: when I try to insert data I get error: SQLSTATE[HY000]: General error: 957 OCIStmtExecute: ORA-00957: duplicate column name
In the db log file I see that phalcon tries to get table columns from ALL_TABLES, ALL_TAB_COLUMNS, ALL_CONS_COLUMNS without filtering owner, just by table name.
Setting up schema name in configuration made no difference, so I set schema directly in Model:
Now I see that phalcon tries to filter by owner, but not for all tables:
JOINS is made without owner what leads to duplicate primary key column and the same duplicate column name error:
I think SQL should look like this (I added AND TC.OWNER = CC.OWNER):
Also would be great if schemas where supported from configuration.
The text was updated successfully, but these errors were encountered: