Tuesday, April 5, 2016

Re: How can I get the user firstname displayed, instead of the User_id

Thanks for your response, do you mean i should create a relationship between the proposal and the user table?

will creating a proposal "belongs to user AND a User has many Proposal", fix this problem?

As for containable behavior, please what do you mean ?


Your quick response would be appreciated.


Thanks

On Mon, Apr 4, 2016 at 5:54 PM, Anja Liebermann <cake@anjaliebermann.de> wrote:
In your controller you have to fetch the user together with you proposal.
To achieve this check the following:

Check in Models your connection between proposal to user. Is it set in both directions?

Check your find statement in the Controller Probably ProposalsController. To which depth do you fetch the data? Do you use Containable Behaviour? If yes you have to do some tweeks there.

Without your code I can give you no better advise, but at least you know now where to check and whch code snippets to post to get qualified answers.

Anja



Am 04.04.2016 um 16:01 schrieb Clement Crownrise:
Note that this is my DB relationship, a user has one profile, and the
proposal table has a User_id colomn, however the profile table is the one
that contains the user's firstname.

Can someone help me please?


--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/EAZoK3CB30Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: