Im no expert but I have my model function to get recent posts something like
this $this->ModelName->getSomeData($id, $count, $order, ???); 

And in the model function 'count' => $count

So depending on the controller / view I need 5 posts, other grab 10 and just
change the count to what I need.

Dave

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Alan Asher
Sent: December-18-09 6:52 PM
To: [email protected]
Subject: bindModel, unbindModel, updateModel?

Has anyone run across a function similar to bindModel and unbindModel which
to me would be called updateModel()

 

Basically, I've run across several situations where I just need to update
the model's limit or ordering and finding that I have to use the bindModel
and repeat everything that was in the model before.  

 

I am a big fan of Don't Repeat Yourself, so an updateModel function would be
super handy.

 

I was thinking of just doing something like this
$this->ModelName->belongsTo['OtherModelName']['order']='something new';

 

Any thoughts???

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 
cake-php+at http://groups.google.com/group/cake-php?hl=en


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.716 / Virus Database: 270.14.102/2556 - Release Date: 12/18/09
04:05:00



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