What steps will reproduce the problem?
'emulatePrepare' => true,
'charset' => 'utf8',
I can select data from oracle,example as below:
$sql = 'select * from sr_black_list where rownum <=100';
$command = Yii::app()->db->createCommand($sql)->queryAll();
it's display the date what I wanted.
So,I think I can connect to oracle in my enviroment.All config is ok.
3.But when I want to use gii ,script show the error:Table 'sr_black_list' does not exist.but it really exit in my oracle database,
What version of the product are you using? On what operating system?
Yii:1.1.8 Oracle:10.2.3 php:5.3
Please provide any additional information below.
Can't gii used in oracle?who can help me, thank u very much.
Migrated from http://code.google.com/p/yii/issues/detail?id=2875
alexander.makarow said, at 2012-02-09T19:03:07.000Z:
Can be related with http://code.google.com/p/yii/issues/detail?id=1775
I've tested this issue. It's not reproducible on my box.
My testing environment:
Windows 7, amd64 (6.1.7601)
PHP 5.4.3, x86
Oracle 11g XE Release 2, x86 (free express edition)
oci.dll version: 184.108.40.206
Yii 1.1.12-dev (this git commit used: 9b7c51d)
Database component configuration:
Maybe it's only Oracle 10g specific.
DROP TABLE "RESURTM"."tbl_post";
CREATE TABLE "RESURTM"."tbl_post" (
"id" NUMBER NOT NULL ,
"title" VARCHAR2(100 BYTE) DEFAULT '' NOT NULL ,
"slug" VARCHAR2(100 BYTE) DEFAULT '' NOT NULL
ALTER TABLE "RESURTM"."tbl_post" ADD CHECK ("id" IS NOT NULL);
ALTER TABLE "RESURTM"."tbl_post" ADD CHECK ("title" IS NOT NULL);
ALTER TABLE "RESURTM"."tbl_post" ADD CHECK ("slug" IS NOT NULL);
ALTER TABLE "RESURTM"."tbl_post" ADD PRIMARY KEY ("id");
Gii sees this table as expected. I'm going to test this issue more.
as this was reported on Yii 1.1.8 it's possible that this got fixed in the meantime
@mdomba Maybe close it? I've tested on real Oracle installation.
please try once more with the same table name as reported and with and without the table prefix set... if all will work we will close this issue... thanks
Hello, I got to repeat this problem in some cases. My testing environment Oracle 10.2.0 x86, php 5.1.6, Yii 1.1.8.
When I try use gii model generator and set RS_ as table prefix, I get error "Table 'BLACK_LIST' does not exist". But if I set all table name in "Table Name" field, all is working fine.
@swarog can you please check that with yii 1.1.12?
@cebe Yes, of course, I try do this today.
select * from sr_black_list where rownum <=100
this will query for table "SR_BLACK_LIST" as Oracle will convert unquoted table/column names to uppercase.
In gii it adds quotes "sr_black_list". I think in 1.1.8 there was no table hint in qii.
I do not think its a yii bug.