[email protected]
[Top] [All Lists]

Re: falsefalse

Subject: Re: falsefalse
From: "Arak Tai'Roth"
Date: Thu, 25 Feb 2010 12:53:29 -0800 PST
I tried with just something simple:

$dbpermit = $this->Permit->find('first', array(
                                'conditions' => array(
                                        'Permit.id' => $id
                                'contain' => array(

which worked as expected, grabbing the Permit info and the Leader
info. Then I added one more level of complexity to it:

$dbpermit = $this->Permit->find('first', array(
                                'conditions' => array(
                                        'Permit.id' => $id
                                'contain' => array(
                                        'Leader' => array('Country')

And this is where the problems start. I get Permit and Leader info as
before, but no Country info. So it seems to me like contain just is
not recognizing a second contain array inside of itself.

On Feb 25, 2:30 pm, John Andersen <j.andersen...@xxxxxxxxx> wrote:
> Ok, understood :)
> Then maybe take it step by step - make a find from Permit with contain
> Leader and nothing more.
> If it works, expand the find with Country.
> If it still works, expand with ProvState.
> and so on.
> Then tell us your result of the step by step method :)
>    John
> On Feb 25, 10:24 pm, "Arak Tai'Roth" <nielsen.dus...@xxxxxxxxx> wrote:> I had 
> indeed read the same things as you had. I did try them, but I
> > was leery to say the least. I have never defined the foreignKey in the
> > fields array and I've never had a problem. Same with defining the
> > models. I never work directly on those models ever, so I don't need
> > them. Same goes for RegistrationLocation and Activity, they do not
> > have their own model files and yet still work properly. So needless to
> > say, those solutions did not bear fruit either.
> > Because there is so much similarity between models that are giving me
> > the right data and this one. And the fact that this one gives me the
> > right data when the find is called on itself. I am lead to believe
> > that the error is in some way I am writing the contain array, however
> > everything I have read has told me write the array in that manner,
> > which just adds to my confusion.
> [snip]

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 

<Prev in Thread] Current Thread [Next in Thread>