Modified generic_fetch():
Modified generic_fetch():

  Sorted out possible SQL precedence problem (idea from James).

  Old SQL (fragment):

    FROM (transcript t)
      LEFT JOIN transcript_stable_id tsi
        ON tsi.transcript_id = t.transcript_id
      LEFT JOIN xref x
        ON x.xref_id = t.display_xref_id
      LEFT JOIN external_db exdb
        ON exdb.external_db_id = x.external_db_id

  New SQL (same fragment):

    FROM
      ( ( ( (transcript t)
            LEFT JOIN transcript_stable_id tsi
              ON tsi.transcript_id = t.transcript_id
          )
          LEFT JOIN xref x
            ON x.xref_id = t.display_xref_id
        )
        LEFT JOIN external_db exdb
          ON exdb.external_db_id = x.external_db_id
      )

Ensembl/ensembl,at7/ensembl,mjg17/ensembl,mjg17/ensembl,muffato/ensembl,danstaines/ensembl,willmclaren/ensembl,muffato/ensembl,james-monkeyshines/ensembl,james-monkeyshines/ensembl,mjg17/ensembl,danstaines/ensembl,at7/ensembl,at7/ensembl,mjg17/ensembl,Ensembl/ensembl,danstaines/ensembl,muffato/ensembl,Ensembl/ensembl,Ensembl/ensembl,at7/ensembl,james-monkeyshines/ensembl,willmclaren/ensembl,muffato/ensembl,james-monkeyshines/ensembl