This is the only thing that is even remotely relevant in app_model:

var $actsAs = array(
                        'Containable'
                );

Other then that, there are only 2 functions, one for validating phone
numbers, and one for changing dates to a format I want.

Like I have said previously, this is all working when I do the search
on the model Leader, just not when I do the search on the model Permit
and have a contain with Leader in it, and then a contain with the
country data.

So because it works for something, just not quite as deep, I have a
feeling we are looking in the entirely wrong area.

On Feb 28, 2:32 am, John Andersen <[email protected]> wrote:
> Ok, if you don't use the Country model, then you are using the
> AppModel, how does it look like?
> Enjoy,
>    John
>
> On Feb 28, 10:31 am, "Arak Tai'Roth" <[email protected]> wrote:
>
> > They are all lowercase, I'm not that new at this.
>
> > Exact code for the leader model for the relationships was already
> > posted above.
>
> > And as I said, I tested it with a Country model and that did not help,
> > and as such I removed it as I don't see a point in a file that doesn't
> > add any value.
>
> > On Feb 28, 2:14 am, John Andersen <[email protected]> wrote:
>
> > > Ok, that is fine, but can you tell me exactly what are the filenames
> > > of your models?
> > > They should all be lowercase!
> > > Also please show the exact code for the Leader model (leader.php) and
> > > the Country model (country.php) from the beginning to the end of the
> > > relationship/association definition.
> > > Enjoy,
> > >    John
>
> > > On Feb 28, 8:15 am, "Arak Tai'Roth" <[email protected]> wrote:
>
> > > > I did indeed do that when you had first asked me if I had made the
> > > > model. It didn't change anything.
>
> > > > On Feb 26, 12:43 am, John Andersen <[email protected]> wrote:
>
> > > > > I would first try to create the Country model, with all the necessary
> > > > > associations/relationships, and then try again.
> > > > > Enjoy,
> > > > >    John
>
> > > > > On Feb 25, 10:53 pm, "Arak Tai'Roth" <[email protected]> wrote:
>
> > > > > > I tried with just something simple:
>
> > > > > > $dbpermit = $this->Permit->find('first', array(
> > > > > >                                 'conditions' => array(
> > > > > >                                         'Permit.id' => $id
> > > > > >                                 ),
> > > > > >                                 'contain' => array(
> > > > > >                                         'Leader'
> > > > > >                                 )
> > > > > >                         ));
>
> > > > > > 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 <[email protected]> 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" <[email protected]> 
> > > > > > > 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 
http://groups.google.com/group/cake-php?hl=en

Reply via email to