Ability to set single document refs to full-fledged documents

#1530