Great, it works now. Thank you very much for the quick help and for  
such a great framework!

Regards,
Christian

On Apr 20, 2009, at 3:51 PM, Jonathan Wage wrote:

> Also add foreignType: one. The relationship defaults to many on the  
> other end so you need to force it to be one to one.
>
> - Jon
>
> On Mon, Apr 20, 2009 at 8:48 AM, Christian Haintz <[email protected] 
> > wrote:
> Thanks Jon, it now find's the getProfile() Method but a new error  
> came up:
>
> "Call to undefined method Doctrine_Collection::getEmail()"
>
> when I call $this->getUser()->getProfile()->getEmail() from my action
>
> My Steps:
> I changed the line in the schema.yml as you said.
> Then I did a
> symfony doctrine-build-all-reload
> and a
> symfony cc
>
> Best Regards,
> Christian
>
> On Apr 20, 2009, at 3:28 PM, Jonathan Wage wrote:
>
>>
>> sf_guard_user_profile:
>>   actAs: [Timestampable]
>>   className: sfGuardUserProfile
>>   columns:
>>     id:
>>       type: integer
>>       primary: true
>>       autoincrement: true
>>     user_id:
>>       type: integer(4)
>>       email: string(255)
>>   relations:
>>     sfGuardUser:
>>       local: user_id
>>       onDelete: CASCADE
>>       foreignAlias: Profile
>>
>> You are missing the foreignAlias causing the relationship name on  
>> the side of the User to be called Profile.
>>
>> - Jon
>>
>> On Mon, Apr 20, 2009 at 7:15 AM, Christian Haintz 
>> <[email protected] 
>> > wrote:
>>
>> Hi
>>
>> I installed the Plugin as it is written in the Readme but i can't
>> access the Profile. I have the same symptoms as described in the  
>> Forum
>> Post [1] but the solution there is kind of a workaround than a real
>> solution i think.
>>
>> Is there probably an error in the getProfile Method in sf1.2 with
>> doctrine or do we miss something?
>>
>> My Schema.yml (not the same as in the Readme because in the readme i
>> think it is not valid doctrine schema syntax)
>>
>> sf_guard_user_profile:
>>   actAs: [Timestampable]
>>   className: sfGuardUserProfile
>>   columns:
>>     id:
>>       type: integer
>>       primary: true
>>       autoincrement: true
>>     user_id:
>>       type: integer(4)
>>       email: string(255)
>>   relations:
>>     sfGuardUser:
>>       local: user_id
>>       onDelete: CASCADE
>>
>> After i loaded the fixtures and logged in I try to access the Profile
>> like this from the Action:
>>
>> $this->getUser()->getProfile()->getEmail()
>>
>> Thx for any help,
>> Christian
>>
>> [1] http://forum.symfony-project.org/index.php/m/73972/
>>
>> --
>> Christian Haintz
>> Student of Software Development and Business Management
>> Graz, University of Technology
>>
>>
>>
>>
>>
>>
>>
>>
>> -- 
>> Jonathan H. Wage
>> Open Source Software Developer & Evangelist
>> http://www.jwage.com
>> http://www.doctrine-project.org
>> http://www.symfony-project.org
>>
>>
>>
>
>
> --
> Christian Haintz
> Student of Software Development and Business Management
> Graz, University of Technology
>
>
>
>
>
>
>
>
> -- 
> Jonathan H. Wage
> Open Source Software Developer & Evangelist
> http://www.jwage.com
> http://www.doctrine-project.org
> http://www.symfony-project.org
>
> >

--
Christian Haintz
Student of Software Development and Business Management
Graz, University of Technology




--~--~---------~--~----~------------~-------~--~----~
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