Doctrine - 请求未知列类型“mystoragetype”

时间:2014-02-04 22:59:58

标签: php symfony doctrine-orm

您好我刚刚在我的Symphony应用程序中更新学说方案时遇到错误。 我跑

php app/console doctrine:schema:update --force   

并收到错误此错误

[Doctrine\DBAL\DBALException]                                                                                                                                                     
Unknown column type "mystoragetype" requested.
Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType().
You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypeMap().
If this error occurs during database introspection then you might have forgot to register all database types for a Doctrine Type.
Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes().
If the type name is empty you might have a problem with the cache or forgot some mapping information.           

我在项目中找不到与“mystoragetype”相关的任何内容,并尝试添加类型但没有任何反应。 你能弄清楚我为什么会收到这个错误吗?

1 个答案:

答案 0 :(得分:2)

Doctrine为具有自定义类型的字段添加注释:类似于:(DC2Type:mystoragetype)。我认为您使用该类型生成了模式,并且必须从实体中删除类型。但评论仍在数据库中。