title: Cakephp pagination with join table field sort is not working
body: <p>Cakephp pagination with join table sort is not working for join table fields. But for custom sql  join query working fine. Please help me to come out.</p>
  
  <p>See below sample code.. I have Artist.name join table field in order.</p>
  
  <pre><code>$this-&gt;paginate = array(
          'fields' =&gt; array(
              'id', 
              'Song.title',
              'Song.date',
              'Artist.id AS artist_id',
              'Artist.name AS artist_name',
              'COUNT(SongViews.id) AS views'
          ),
          'group' =&gt; array('ArtistsSong.song_id'),
          'recursive' =&gt;  0,
          'limit' =&gt;  20,
          'joins' =&gt; array(
              array(
                  'table' =&gt; 'tbl_artists_songs',
                  'alias' =&gt; 'ArtistsSong',
                  'conditions'=&gt; array('Song.id = ArtistsSong.song_id')
              ),array(
                  'table' =&gt; 'tbl_artists',
                  'alias' =&gt; 'Artist',
                  'conditions'=&gt; array('Artist.id = ArtistsSong.artist_id')
              ),array(
                  'table' =&gt; 'tbl_song_views',
                  'alias' =&gt; 'SongViews',
                  'type' =&gt; 'left',
                  'conditions'=&gt; array('SongViews.song_id = ArtistsSong.song_id')
              ),
          ),
          'order' =&gt; array('Artist.name'=&gt;'asc')
  
      );
  </code></pre>