Re: Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-25 Thread Alastair
On Jul 24, 10:10 pm, mariusz.lewandowski lew...@gmail.com wrote: I'm also looking for some convinient way to avoid invoking bindModel method .. I'll tell you what fixed my problem, it was giving the model file the correct extension. My comment model file was named comment.ctp not comment.php

Re: Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-24 Thread mariusz.lewandowski
I'm also looking for some convinient way to avoid invoking bindModel method .. On Jul 23, 1:52 pm, Alastair alast...@zanginteractive.com wrote: Hi and many thanks for your help! This did work, however it doesn't make sense that I've had to do this in the first place! It seems like accessing

Re: Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-23 Thread mariusz.lewandowski
I had the same issue. The resolutions goes like that: in beforeFilter i invoke: public function beforeFilter() { $this-pageTitle = 'Portfolio'; $this-Portfolio-bindModel(array( 'belongsTo' =

Re: Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-23 Thread Alastair
Hi and many thanks for your help! This did work, however it doesn't make sense that I've had to do this in the first place! It seems like accessing the parent model of a child model is broken. I don't know if I'm doing something completely wrong but I can access my comments records from the user

Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-22 Thread Alastair
Hoping someone can suggest something here! I have a number of models, which look as follows: Comment -- class Comment extends AppModel { var $name = 'Comment'; var $validate = array( 'body' = array('rule' = 'notEmpty') ); var