try to implement store relations in docs, but too obscure code...
undo many changes to apply relationships, for now you can apply all relationships to a document manually
tweaked bidirectional behaviour and added test