[FLOW3-general] doctrine:update error

Wasko Jugovic mailtestler at web.de
Fri Aug 10 10:57:14 CEST 2012


Hi,

I need a table with an auto-incrementing column "idnr".
When I do doctrine:update for the very first time this table is created:

 `flow3_persistence_identifier` VARCHAR(40) NOT NULL,
 `account` VARCHAR(40) NULL DEFAULT NULL,
 `idnr` INT(11) NOT NULL AUTO_INCREMENT
  .....

But if I do now  doctrine:update and the table already exists in database,
I get this error:

Uncaught Exception
 SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table 
definition;
there can be only one auto column and it must be defined as a  key

"idnr" is defined as key automatically and it's the only auto column.  So 
what's wrong?


This is my model:

/**
 * A Customer
 *
 * @FLOW3\Entity
 * @ORM\Table(name="customer")
 */
class Customer {

 /**
 * The Customers's account
    * @var \TYPO3\FLOW3\Security\Account
    * @ORM\OneToOne(cascade={"all"})
    */
    protected $account;

  /**
    * The idnr
    * @var integer
    * @ORM\Column(columnDefinition="INT(11) NOT NULL AUTO_INCREMENT UNIQUE")
    */
    protected $idnr;

............





More information about the FLOW3-general mailing list