On Mon, 17 Jan 2011 16:56:03 +0100, Javier Garcia <tirengar...@gmail.com> wrote: > Hi, > > i have installed sfGuardPlugin and created this model: > > propel: > sf_guard_user_profile: > _attributes: { phpName: sfGuardUserProfile } > id: ~ > user_id: { type: integer, foreignTable: sf_guard_user, > foreignReference: id, required: true, onDelete: cascade } > name: varchar(50) > > As it is written here, > http://www.propelorm.org/wiki/Documentation/1.4/Relationships (see > "One-to-one relationships"), It is supposed symfony generates the > function sfGuardUser->getSfGuardUserProfile() and > sfGuardUserProfile->getSfGuardUser() but I have this code: > > // this works > $c1 = new Criteria(); > $elements = sfGuardUserProfilePeer::doSelect($c1); > var_dump($elements[0]->getSfGuardUser()); > > // this doesn't work > $c2 = new Criteria(); > $elements = sfGuardUserPeer::doSelect($c2); > var_dump($elements[0]->getSfGuardUserProfile()); > > and it doesn't work. It says: > > > Call to undefined method BasesfGuardUser::getSfGuardUserProfile > > > sf 1.4/propel 1.4 > > Javier
The correct method name is ``getProfile()`` as stated there: http://www.symfony-project.org/plugins/sfGuardPlugin -- Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.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