Re: Is it possible to get find() to bypass associated model?

2012-09-18 Thread Lightee
THanks! This works! On Monday, September 17, 2012 5:36:31 PM UTC+8, Andras Kende wrote: easiest way if only need records from current model: $records = $this-Record-find('all', array( 'recursive' = -1, )); Andras Kende http://www.kende.com On Sep 17, 2012, at 2:10 AM, Lightee

Re: Is it possible to get find() to bypass associated model?

2012-09-18 Thread Devario Johnson
in the controller method $this-ModelNameHere-recursive = -1; On Tuesday, September 18, 2012 8:10:33 AM UTC-4, Lightee wrote: THanks! This works! On Monday, September 17, 2012 5:36:31 PM UTC+8, Andras Kende wrote: easiest way if only need records from current model: $records =

Is it possible to get find() to bypass associated model?

2012-09-17 Thread Lightee
Dear Cakephp experts, When I use find('all), all the records in the model and associated model will be returned. May I ask if it is possible to bypass the associated models and show only the records of the model? Do I have to write SQL to do that? Thank you. -- Like Us on FacekBook

Re: Is it possible to get find() to bypass associated model?

2012-09-17 Thread Jeremy Burns | Class Outfit
If you are using the containable behaviour, just add 'contain' = array() to the find call and you'll get back just the current model. If you are not, then add 'recursive' = 0 to the find call. Jeremy Burns Class Outfit http://www.classoutfit.com On 17 Sep 2012, at 10:10:19, Lightee

Re: Is it possible to get find() to bypass associated model?

2012-09-17 Thread Andras Kende
easiest way if only need records from current model: $records = $this-Record-find('all', array( 'recursive' = -1, )); Andras Kende http://www.kende.com On Sep 17, 2012, at 2:10 AM, Lightee lightai...@gmail.com wrote: Dear Cakephp experts, When I use find('all), all the records in