Friday, January 11, 2013

Related data when using pages controller

Just an fyi for anyone who may have an issue in 2.x when viewing a pr($this->Model->find('all'); from the pages controller, make sure that first letter is capitalized (which is what you should be doing anyway).  lol  I spent a few minutes trying to find out why the heck none of the relations were coming through, when the issue was that in the $uses array, I had specified the model with a lowercase instead of an uppercase, which as soon as I corrected that and updated the corresponding calls all was back to normal.  

Just wanna save someone some time if searching on this.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: