Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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



17.3k
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 http://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!



31.6k

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