Is debugging on so you can see the sql error? It's having trouble
'finding one' - which is one generative sql call so if IT fails the
whole bloody thing fails and you get an empty array.


On Aug 19, 2:55 pm, Marcos  Mendonça <marc...@gmail.com> wrote:
> have you tried without the 'dependent' => true attribute?
>
> On Aug 19, 3:58 pm, Tomfox Wiranata <tomfox.wiran...@gmail.com> wrote:
>
>
>
> > hi,
>
> > weird thing. i declare a hasOne relation:
>
> > class User extends AppModel
> > {
> >     var $name = 'User';
>
> >     var $hasOne = array(
> >                 'Link' => array(
> >                         'className' => 'Link',
> >                         'dependent' => true
> >                 )
> >         );
>
> > }
>
> > suddenly i am having "undefined index" everywhere i use that model in
> > my views, like:
>
> > <span class="profiledata"><?php echo $user['firstname']; ?></span>
>
> > if i delete the hasOne part it works fine and the view shows the user
> > data...what the heck did i do wrong? looking forward to your
> > feedback..
>
> > big big thx

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to