Skip to content
Advertisement

Doctrine custom types, problems updating schema

I’m having problems when I try to update my schema with doctrine “bin/console doctrine:schema:update -f”

The problem is

[DoctrineDBALException]
Unknown column type “FinancesBankInfrastructurePersistenceDoctrineBankIdType” requested. Any Doctrine type that you use has to be registered with DoctrineDBALTypesType::addType(). You can get a lis
t of all the known types with DoctrineDBALTypesType::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. U
se 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.

It’s strange because when I see in my schema database I found the type in the coments, and if I delete it I can update the schema normally. I didn’t find any aditional configuration to solve this. Actually my config.yml is:

JavaScript

schema detail

The custom type:

JavaScript

The UuidType (abstract)

JavaScript

The interface implemented:

JavaScript

It’s the mapping “Bank.orm.xml”

JavaScript

This is driving me crazy!

Advertisement

Answer

Finally the solution was delete all the doctrine comments in mysql database and in the mapping config set the custom types as follows:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement