Hi guys. I’m face a problem since yesterday afternoon when I try generate a Model using gii and Oracle. It shows me a following error:
SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist
(/usr/src/php-5.5.9/ext/pdo_oci/oci_statement.c:148)
The SQL being executed was: SELECT username
FROM dba_users u
WHERE EXISTS (
SELECT 1
FROM dba_objects o
WHERE o.owner = u.username )
AND default_tablespace not in ('SYSTEM','SYSAUX')
I don’t know why it try access this table. I can create 2 complete CRUDs before it.
Looking at code I guess that is used to create cross schema relation.
At this moment is supported only by postgresql ad oracle (at least the method findSchemaName() in present only in these 2 driver)
Other db get tables only from current schema.
I have to say that is a bit strange since at least in mysql is possible to do the same but the method has not been implemented in the driver
Probably is necessary to raise an excpetion in case of permission denied in the oracle driver like in the corresponding method of the base Schema class
/yii/db/Schema
protected function findSchemaNames()
{
throw new NotSupportedException(get_class($this) . ' does not support fetching all schema names.');
}