document id and code as unique key