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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -