0

私はsymfony 1.4.11を使用しています。私は sfDoctrineGuardPlugin と sfDoctrineApplyPlugin を使用しています。 backend 、 sf_guard_user テーブルからのみプロファイルを削除しましたが、sf_guard_user_profileテーブルからはプロファイルを削除しませんでした ...どうすれば修正できますか?両方のプラグインの設定に問題があるのでしょうか? ありがとうございました!

sfGuardUserProfile:
  connection: doctrine
  tableName: sf_guard_user_profile
  columns:
    id:            { type: integer(4), primary: true, autoincrement: true }
    user_id:       { type: integer(4), notnull: true , primary: false }
    salutation:    { type: string(10), notnull: true }
    first_name:    { type: string(30), notnull: true }
    last_name:     { type: string(30), notnull: true }
    country:       { type: string(255), notnull: true }
    postcode:      { type: string(10) , notnull: true }
    city:          { type: string(255), notnull: true }
    address:       { type: string()   , notnull: true }
    phone:         { type: string(50) }
    email:         { type: string(255), notnull: true }
    validate:      { type: string(17) }
    banned:        { type: boolean, default: 0 }
    payed_until:   { type: datetime, notnull: true}
  relations:
    User:
      class: sfGuardUser
      foreign: id
      local: user_id
      type: one
      onDelete: cascade
      foreignType: one
      foreignAlias: Profile
4

2 に答える 2

1

データベースを MyISAM から INNODB に変更するだけで、すべて正常に動作します!

于 2011-06-09T21:56:02.110 に答える
0

新しいユーザーの作成について - そもそも両方のプラグインにそのような機能があるかどうかはわかりません。(少なくとも私はそれについて知りません)。

sf_guard_user_profileテーブルからのユーザーおよび関連データの削除について- リレーション定義に問題がある可能性が高いと思います。sf_guard_user_profileテーブルが定義されているインストール セクションで、 sfDoctrineApplyPluginのreadme を再度確認します。User 関係にonDelete: cascadeを設定する必要があります。

最後に、適切な SQL が生成され、データベース スキーマに適用されているかどうかを確認します。

よろしく。

于 2011-06-03T14:18:29.847 に答える