document the ObjectDb and fix a wrong API when getting attachments