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

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -