Relationships and conversion from restobj to pouch doc