updates test example to show how to set relationships

if it is the right way to set a relationship it would be great to have it in the docs.
if not please explain me how to do it.