How to make id autoincremental ? I thought that symfony did it for me.

Piece of schema.yml file:
...
  portal_user:
    _attributes: { phpName: PortalUser }
    id:
    login:          { type: varchar(255), required: true }
    password:       { type: varchar(255), required: true }
...


RafaƂ

On Tue, Feb 24, 2009 at 7:31 PM, Andy Dziahel' <[email protected]>wrote:

> Hi.
>
> Looks like you just forgot to make `portal_user`.`id` autoincremented.
>
>
> On Tue, Feb 24, 2009 at 19:02, RaV <[email protected]> wrote:
>
>> Hi!
>>
>> I have a problem with propel-load-data.
>> I wrote my fixture:
>>
>> data/fixtures/data.yml:
>>
>> PortalUser:
>>   portuser_1:
>>     login: login
>>     password: adf
>>     name: Rafal
>>     surname: Beeee
>>     created_at: 2008-12-26
>>     updated_at: 2008-12-26
>>     email: [email protected]
>>     is_admin: true
>>     created_at: 2008-12-11
>>     updated_at: 2008-12-11
>> Configuration:
>>   configuration_0:
>>     name: LOG_DELAY
>>     value: 5
>>     comment: 'sdf'
>>     updated_at: 2009-01-26
>>
>> But when i was trying to load this into database, i saw the message:
>>   Unable to execute INSERT statement. [wrapped: Could not execute update
>> [Native Error: ERROR:  null value in column "id" violates not-null
>> constraint] [User Info: INSERT INTO portal_user
>> (LOGIN,PASSWORD,NAME,SURNAME,EMAIL,IS_ADMIN,CREATED_AT,UPDATED_AT) VALUES
>> ('login','adf','Rafal','Beeee','[email protected]','t','2008-12-11
>> 00:00:00 +0100','2008-12-11 00:00:00 +0100')]]
>>
>> I was wondering why my symfony didn't set id automatically. Should I have
>> to write it in my  fixture?
>>
>>
>> Thank you!
>>
>> Rafal
>>
>>
>>
>>
>
>
> --
> With the best regards, Andy.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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