7

I reverse engineered my database with symfony2 and doctrine with commands :

php app/console doctrine:mapping:convert
php app/console doctrine:mapping:import
php app/console doctrine:generate:entities

But my field was mapped as boolean instead of tinyint(2).

Why it is mapping as boolean?

Ocramius
  • 25,171
  • 7
  • 103
  • 107
Mohammed H
  • 6,880
  • 16
  • 81
  • 127

1 Answers1

17

tinyint (regardless of length) is mapped to type boolean in the MySQL DBAL platform.

Also, consider that the entity generator is not a reliable tool: it was just meant to give you some help in getting started with larger schemas.

Ocramius
  • 25,171
  • 7
  • 103
  • 107