I am having a bit of strange behavior I hope someone can straighten me
out on.
2 classes, Angler and Trip:
Angler hasMany Trip
Trip belongsTo Angler
angler_id is in the Trip Table
I have a function showtrips($angler_id = null) in the Trips Controller
that displays trips or angler trips depending on the input parm.
showtrips has a line that says "$this->Angler->read(null, $angler_id)"
and it executes fine.
Then I have another 2 classes, Catch and Imagefile. Similarly:
Catch hasMany Imagefile
Imagefile belongsTo Catch
catch_id is in the Trip Table
I have a function showimages($catch_id = null) in the Images
controller that displays images or catch images depending on the input
parm. showimages has a line that says $this->Catch->read(null,
$catch_id) and I get the old member function non-object error thrown.
If I recode it to say $this->Imagefile->Catch->read(null, $catch_id)
all is OK (or cheat things up and put the Catch class in a $uses stmt
in the Trips controller).
The Trips controller DOES NOT have a $uses, but the Imagefiles
controller DOES have one (var $uses = array('Imagefile', 'Folder')
since it needs the Folder class.
What is going on here? Is there an implied $uses in the Trips
controller from the associations? Is my explicit $uses in the
Imagefiles controller perhaps messing that up from its associations?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---