Hey dude, it's possible, but not portable !!
You have to use the columnDefinition like this :

    /**
     * @orm:Id
     * @orm:Column(columnDefinition="integer unsigned")
     * @orm:GeneratedValue(strategy="IDENTITY")
     */

Yes this options let you defined *completely* your column definition.
Enjoy.

On 7 déc, 22:22, Francis Besset <[email protected]> wrote:
> Hi all,
> I have a problem to create a columns with Doctrine2.
>
> I use annotations to create my schema.
>
> When i write this, I have no problem :
>      /**
>      * @orm:Id
>      * @orm:Column(type="integer")
>      * @orm:GeneratedValue(strategy="IDENTITY")
>      */
>     protected $id;
>
>     public function setId($id)
>     {
>         $this->id = $id;
>
>         return $this;
>     }
>
> But I want create a column unsigned, Doctrine2 return an exception when
> creating table :
>     /**
>      * @orm:Id
>      * @orm:Column(type="integer", unsigned=true)
>      * @orm:GeneratedValue(strategy="IDENTITY")
>      */
>     protected $id;
>
>     public function setId($id)
>     {
>         $this->id = $id;
>
>         return $this;
>     }
>
> The exception is :
>   [BadMethodCallException]
>   Unknown property 'unsigned' on annotation 'Doctrine\ORM\Mapping\Column'.
>
> I don't understand, and I do not find the class Doctrine\ORM\Mapping\Column.
>
> PS : I use MySQL driver.
>
> Thanks for your help,
> Francis.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to