CREATE DEFINER=`jhise`@`localhost` PROCEDURE `documents_get_by_project`(in i_project_access_key char(32))
BEGIN
	select
		doc.*
	from
		document doc
			join project_document_jct j on j.document_access_key = doc.access_key
				join project p on p.id = j.project_id
	where
		p.access_key = i_project_access_key;
END
