select document_mimetype, document_data from resource_t where resource_id = :id
using a media resource did the trick where mimetype and the blob column are requested from the database table.