Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DDC-154: SchemaTool generates cryptic error message in case of typos on referenced column names #2173

Closed
doctrinebot opened this issue Nov 17, 2009 · 5 comments
Assignees
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user giorgiosironi:

When there is a typo in a @joincolumn(name='...', referencedColumnName='_error_'), the error does not give any clue where to look for:

[09:09:44][giorgio@Indy:/var/www/nakedphp]$ php example/bin/doctrine schema-tool --re-create --config=example/bin/cli-config.php
Doctrine Command Line Interface

Dropping database schema...
Database schema dropped successfully.
Creating database schema...
SchemaTool: exception 'Doctrine\Common\DoctrineException' with message 'Unknown column type' in /var/www/nakedphp/library/Doctrine/Common/DoctrineException.php:111
Stack trace:
#0 [internal function]: Doctrine\Common\DoctrineException::**callStatic('unknownColumnTy...', Array)
#1 /var/www/nakedphp/library/Doctrine/DBAL/Types/Type.php(125): Doctrine\Common\DoctrineException::unknownColumnType(NULL)
#2 /var/www/nakedphp/library/Doctrine/ORM/Tools/SchemaTool.php(329): Doctrine\DBAL\Types\Type::getType(NULL)

@doctrinebot
Copy link
Author

Comment created by giorgiosironi:

Transforms the exception in:
SchemaTool: exception 'Doctrine\Common\DoctrineException' with message 'Column name id referenced for relation from Example_Model_Place towards Example_Model_City does not exist.' in /var/www/nakedphp/library/Doctrine/ORM/Tools/SchemaTool.php:332

Sorry for lack of tests but the only ones for SchemaTool needs mysql or other vendor and I cannot run them with sqlite right now.

@doctrinebot
Copy link
Author

Comment created by giorgiosironi:

Transform the exception in:
SchemaTool: exception 'Doctrine\Common\DoctrineException' with message 'Column name id referenced for relation from Example_Model_Place towards Example_Model_City does not exist.' in /var/www/nakedphp/library/Doctrine/ORM/Tools/SchemaTool.php:332

Sorry for lack of tests but the SchemaTool ones need mysql or other vendors and I cannot run them right now with sqlite.

@doctrinebot
Copy link
Author

Comment created by @beberlei:

Applied and fixed.

@doctrinebot
Copy link
Author

Issue was closed with resolution "Fixed"

@doctrinebot
Copy link
Author

Imported 1 attachments from Jira into https://gist.github.com/bed5ea18c1da9e927fe7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants