Is it possible to get load values from related documents and emit them as part of the key/value along with values from the current document in CouchDb?
Example:
{Id: 1, Type: Entity, Name: US, Code: 001}
{Id: 2, Type: Entity, Name: Alaska, Code: AL, Parent_Id: 1}
{Id: 3, Type: Entity, Name: California, Code: CAL, Parent_Id: 1}
{Id: 4, Type: Entity, Name: Juneau, Code: C-JUN, Parent_Id: 2}
I would want to read the code, name, etc. from the parent entity and the current entity both and emit them as the key/value in the map function. If the parent has a further parent, I would like to read values from that too. (Link walking in other databases)