Support of Direction.BOTH for a relationship

fixes issue #29