Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

scaffold table name #605

Closed
zdevil opened this issue May 4, 2013 · 1 comment
Closed

scaffold table name #605

zdevil opened this issue May 4, 2013 · 1 comment

Comments

@zdevil
Copy link

zdevil commented May 4, 2013

Hi,

I'm using Dev tools 1.0.1 and having an issue with tables name, not sure if it's from my end.
I was able to generate Models.

Example:
php scripts/phalcon.php scaffold --table-name User
User is the table name but the pdo is looking for user.

Error below (I also tried command line)

Thanks

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phalcon.user' doesn't exist
#0 [internal function]: PDO->query('DESCRIBE user')
#1 [internal function]: Phalcon\Db\Adapter\Pdo->query('DESCRIBE user', NULL, NULL)
#2 [internal function]: Phalcon\Db\Adapter->fetchAll('DESCRIBE user', 3)
#3 [internal function]: Phalcon\Db\Adapter\Pdo\Mysql->describeColumns('user', NULL)
#4 [internal function]: Phalcon\Mvc\Model\MetaData\Strategy\Introspection->getMetaData(Object(User), Object(Phalcon\DI\FactoryDefault))
#5 [internal function]: Phalcon\Mvc\Model\MetaData->_initialize(Object(User), 'user-user', 'user', NULL)
#6 [internal function]: Phalcon\Mvc\Model\MetaData->readMetaDataIndex(Object(User), 0)

@zdevil
Copy link
Author

zdevil commented May 4, 2013

My bad,
Had the models already created.

@zdevil zdevil closed this as completed May 4, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant