mysql - How do I Sort a column based on the has many field in cakephp 2.x -
i have following relationships in models
state has many lga.
lga has many wards.
i displaying paginated list of states , 1 of column contains lga , contains ward. can sort state , lga unable sort ward.
cake returs error: sqlstate[42s22]: column not found: 1054 unknown column 'ward.name' in 'order clause'
i can see in resulting sql query, cake adding ward.name order clause without being in actual joins query.
has experienced this? how did solve it?
thanks.
Comments
Post a Comment