We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

generate oracle models by dev-tools

Hi guys!

I'm triing to make models to a table on a database oracle xe 11g. Follow my config:

return new \Phalcon\Config(array(
     'database' => array(
         'adapter'     => 'Oracle',
         'username'    => 'SAAS',
         'password'    => 'saas',
         'dbname'      => '//192.168.120.27/XE',
         'schema' => 'SAAS'
     ),

I created table:

CREATE TABLE "SAAS"."USERS" 
    (   "ID" NUMBER(10,0) NOT NULL ENABLE, 
    "NAME" VARCHAR2(70 BYTE) NOT NULL ENABLE, 
    "EMAIL" VARCHAR2(70 BYTE) NOT NULL ENABLE, 
     PRIMARY KEY ("ID"))
   TABLESPACE "SAAS" ;

And try run command: phalcon model --name USERS from de project createde by command phalcon create-project myproject and error is reported:

Phalcon DevTools (1.3.1)

Error: Table "USERS" does not exists



22.5k
Accepted
answer
edited Apr '14

I resolved this issue with passing parameter schema to phalcon command as follow:

C:\workfolder\phalcon\project>phalcon model --name=USERS --schema=SAAS --force --get-set

Detail is that the config Phalcon has a bug and does not work for the bootstrap can be understood as the post https://goo.gl/TgTHQe but is necessary for the devtools function as in the example:

'database' => array(
             'adapter'     => 'Oracle',
             'username'    => 'SAAS',
             'password'    => 'saas',
             'dbname'      => '//192.168.120.27/XE',
             'schema'      => 'SAAS'
         ),

Good luck!



81.1k

In this part of my devtolols Phalcon DevTools (2.0.7) remains unreacted expecting something from the web interface is the same if I specify the schema name, otherwise tells me that the table does not exist