Problem with Joins :(

@document_pages, @documents = paginate :documents, :per_page => 20, :joins => "LEFT JOIN companies ON companies.id = documents.company_id", :conditions => "doc_type_id = '#{@doc_type_id}'", :order => "companies.name asc"

The problem with this segment of code is that when I try to display a document's ID number, it displays the companies' ID number, since the join overwrites @documents.id with companies.id.

How can I prevent this?

Thanks, Ben Lisbakken