Sorting by a (second level) associated model using paginate helper

2011-01-31 Thread Pete
Dear all, I suspect this is either really easy or very hard. I've been through endless apparently similar questions on here but haven't been able to figure out the answer. I have a Quote model, which I am trying to list in a view. Quote belongsTo Attendance which belongs to Person. I am trying

Re: Sorting by a (second level) associated model using paginate helper

2011-01-31 Thread javier ader
Hi. I am not sure, but why about: echo $this-Paginator-sort('Name', 'Person.first_name'); (that is, without prefix Attendance; btw, the normal sintax for this parameter is Model.Field, not Model1.ModelRelated2.ModelRelated3Field) -- Our newest site for the community: CakePHP Video

Re: Sorting by a (second level) associated model using paginate helper

2011-01-31 Thread Amit Badkas
Hi, As per the code at http://api13.cakephp.org/view_source/controller/#l-1060and http://api13.cakephp.org/view_source/controller/#l-1128 , I don't think paginate() can sort using the field of model which has more than one level deep relation with the paginated model. Amit Badkas PHP