Hi Daniel,

I modify my schema.yml :

options:
  collate: utf8_unicode_ci
  charset: utf8
KiosquePatient:
  actAs: { Timestampable: ~ }
  columns:
    matricule:   { type: string(255), notnull: true }
    naissance:   { type: timestamp, notnull: true}
sfGuardUser:
  columns:
    firstname: { type: string(255), notnull: true  }
    lastname: { type: string(255), notnull: true  }
    email: { type: varchar(255) }

and I tried a "doctrine:build -all". But a new error appeared :

SQLSTATE[HY000]: General error: 1005 Can't create table
'kiosque.#sql-7b5_23' (errno: 121). Failing Query: "ALTER TABLE
sf_guard_group_permission ADD CONSTRAINT
sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN
KEY (permission_id) REFERENCES sf_guard_permission(id) ON DELETE
CASCADE". Failing Query: ALTER TABLE sf_guard_group_permission ADD
CONSTRAINT
sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN
KEY (permission_id) REFERENCES sf_guard_permission(id) ON DELETE
CASCADE

Did I do a new mistake ?

Thanks in advance

On 12 déc, 00:12, Daniel Lohse <[email protected]> wrote:
> No, that's not entirely correct as the sfDoctrineGuardPlugin automatically 
> merges the profile form.
>
> And because you're on symfony 1.4, just delete the sfGuardUserProfile which 
> is not needed on symfony 1.4, just add the sfGuardUser model to your schema 
> and add the additiional fields. The new stuff in symfony takes care of 
> merging all the existing schema files.
>
> You. Don't. Need. Profiles. In. sfDoctrineGuardPlugin. Anymore. :)
>
> Cheers, Daniel
>
> On 2009-12-11, at 11/December, 11:28 PM, Alexandre Salomé wrote:
>
> >http://www.symfony-project.org/advent_calendar/
>
> > You should read day 8 and 9 : extending forms.
>
> > You will learn how to embed a relation in a form.
>
> > You must embed the profile form in your user form. Don't mind admin gen, 
> > just think about your form, and after that your form works, make it fully 
> > appear in your admin gen.
>
> > 2009/12/11 Julien L <[email protected]>
> > I'm on the version 1.4
>
> > On 11 déc, 18:37, Daniel Lohse <[email protected]> wrote:
> > > What symfony version are you using – 1.2 or 1.3/1.4?
>
> > > Daniel
>
> > > On 2009-12-11, at 11/December, 6:25 PM, Julien L wrote:
>
> > > > Hi,
>
> > > > I'm working with this following schema.yml :
>
> > > > # config/doctrine/schema.yml
> > > > options:
> > > >  collate: utf8_unicode_ci
> > > >  charset: utf8
> > > > KiosquePatient:
> > > >  actAs: { Timestampable: ~ }
> > > >  columns:
> > > >    matricule:   { type: string(255), notnull: true }
> > > >    naissance:   { type: timestamp, notnull: true}
> > > > sfGuardUserProfile:
> > > >  columns:
> > > >    id: { type: integer, primary: true, autoincrement: true }
> > > >    user_id: { type: integer(4) }
> > > >    firstname: { type: string(255) }
> > > >    lastname: { type: string(255) }
> > > >    email: { type: varchar(255) }
> > > >  relations:
> > > >    User:
> > > >      class: sfGuardUser
> > > >      local: user_id
> > > >      foreign: id
> > > >      type: one
> > > >      foreignType: one
> > > >      foreignAlias: Profile
>
> > > > because I want to add new fields in my sfGuardUserForm (firstname ,
> > > > lastname and email). The problem is that I don't know how to display
> > > > these new fields on my form.
>
> > > > I create a new module sfGuardUser add I added in it's generator.yml :
>
> > > > form:
> > > >        class: sfGuardUserAdminForm
> > > >        fields:
> > > >          firstname: { label: "Prénom" }
> > > >          lastname: { label: "Nom" }
> > > >        display:
> > > >          "NONE":                   [username, password,
> > > > password_again]
> > > >          "Informations personnelles" : [firstname, lastname, email]
> > > >          #"Permissions and groups": [is_active, is_super_admin,
> > > > groups_list, permissions_list]
> > > >          "Groupes": [is_active, groups_list]
>
> > > > After cleared the symfony cache, I want to display my module and
> > > > "Widget "firstname" does not exist." error appears.
>
> > > > Where is my error?
>
> > > > Thank you
>
> > > > (sorry for my bad english)
>
> > > > --
>
> > > > 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 
> > > > athttp://groups.google.com/group/symfony-users?hl=en.
>
> > --
>
> > 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 
> > athttp://groups.google.com/group/symfony-users?hl=en.
>
> > --
> > Alexandre Salomé
> >http://alexandre-salome.fr
>
> > --
>
> > 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 
> > athttp://groups.google.com/group/symfony-users?hl=en.

--

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