Snippets

Create an account or login to be able to add, comment and rate snippets.

Navigation

foreignkey to sf_guard_user

if you won´t to add a foreignkey to sf_guard_user put this on top off you schema.yml file ;)

propel:
  _attributes :          { package: "plugins.sfGuardPlugin.lib.model" }
  sf_guard_user:
    _attributes:         { phpName: sfGuardUser }
    id:

now you can simple add a foreignkey

propel:
  tbl_user_profile:
    user_id:             { type: integer, primaryKey: true, foreignTable: sf_guard_user, foreignReference: id, onDelete: cascade }

or

propel:
  tbl_user_profile:
    sf_guard_user_id:
by Gordon Franke on 2007-04-27, tagged database  foreignkey  model  plugin  propel  schema  security  user  yml 

Comments on this snippet

gravatar icon
#1 Szabolcs Heilig on 2007-06-10 at 11:07

Tried, but didn't work. :(

propel > om-template: [propel-om] Target database type: mysql [propel-om] Target package: lib.model [propel-om] Using template path: /usr/share/php/symfony/vendor/propel-generator/templates [propel-om] Output directory: /var/www/argus [propel-om] Processing: generated-schema.xml [propel-om] Could not perform XLST transformation. Make sure PHP has been compiled/configured to support XSLT. [propel-om] Processing: generated-sfGuardPlugin-schema.xml [propel-om] Could not perform XLST transformation. Make sure PHP has been compiled/configured to support XSLT. Execution of target "om-template" failed for the following reason: /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: ERROR!! Attempt to set foreign key to nonexistent column, id, in table, sf_guard_user_profile! [phingcall] /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: ERROR!! Attempt to set foreign key to nonexistent column, id, in table, sf_guard_user_profile!

You need to create an account or log in to post a comment or rate this snippet.