You have to rebuild your model first then rebuild the sql.

RaV wrote:
> Doesn't work :(
> 
> portal_user:
>      _attributes:  { phpName: PortalUser }
>      id: ~
> 
> But after: ./symfony propel-build-sql
> 
> I have file data/sql\lib.model.schema.sql:
> -----------------------------------------------------------------------------
> -- portal_user
> -----------------------------------------------------------------------------
> 
> DROP TABLE "portal_user" CASCADE;
> 
> 
> CREATE TABLE "portal_user"
> (
>     "id" INTEGER  NOT NULL,
>     "login" VARCHAR(255)  NOT NULL,
>     "password" VARCHAR(255)  NOT NULL,
> 
> What have i done wrong?
> 
> Rafał
> 
> 2009/2/25 Tom Haskins-Vaughan <t...@templestreetmedia.com 
> <mailto:t...@templestreetmedia.com>>
> 
> 
>     I'm not sure, but try giving it NULL attibutes with ~:
> 
>     ...
>       portal_user:
>          _attributes:  { phpName: PortalUser }
>          id:           ~
>     ...
> 
>     Hope this helps.
> 
>     Tom
> 
> 
>     RaV wrote:
>      > 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'
>     <trickster...@gmail.com <mailto:trickster...@gmail.com>
>      > <mailto:trickster...@gmail.com <mailto:trickster...@gmail.com>>>
>     wrote:
>      >
>      >     Hi.
>      >
>      >     Looks like you just forgot to make `portal_user`.`id`
>     autoincremented.
>      >
>      >
>      >     On Tue, Feb 24, 2009 at 19:02, RaV <inad...@gmail.com
>     <mailto:inad...@gmail.com>
>      >     <mailto:inad...@gmail.com <mailto:inad...@gmail.com>>> 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: ra...@bednario.glu
>      >             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','ra...@bednario.glu','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.
>      >
>      >
>      >
>      >
>      >
>      > >
> 
>     --
>     Tom Haskins-Vaughan
>     Temple Street Media: Design and Development for the Web
>     t...@templestreetmedia.com <mailto:t...@templestreetmedia.com> |
>     www.templestreetmedia.com <http://www.templestreetmedia.com>
> 
> 
> 
> 
> 
> > 

-- 
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
t...@templestreetmedia.com | www.templestreetmedia.com


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

Reply via email to