> around.(and if by misake you reverse the source and 
> destination node some 
> code in the mmbase core swaps them back)

Thanks Kees. I always thought i was not smart enough to understand the
behavior of searchdir ;-)

> thus has nothing to do with directionality(actualy it is very 
> confusing)

I agree, we really need a crystal clear definition of directionality.

> -add a field to the relations that ls tell wat direction the 
> relation was 
> created and remove the "field swap" hack

A. On CREATION of a relation the definition of the relation-type defines
the result.

A.1. If the underlying RelDef object is BI-directional a relation is
added in the direction it was created. ANY SWAPPING OF SOURCE AND
DESTIONATION SHOULD BE CONSIDERED A BUG.

A.2. If the underlying RelDef object is UNI-directional a relation may
only be added in the direction specified in the RelDef object. Creating
a relation in the opposite direction should result in an error message
like: "ERROR: the relation from images to news is not possible. Maybe
you wanted to create a relation from news to images, which is possible".

B.On USING a relation the result is defined by:

B.1. If the underlying RelDef object is BI-directional the searchdir
determines the result.

B.2. If the underlying RelDef object is UNI-directional the relation
will only be used in the direction specified in the RelDef. Specifying a
searchdir on an UNI-directional relation should result in an error
messag like: "ERROR: the relation from images to news is
uni-directional. The searchdir parameter is only available for
BI-directional relations."

What do you think?

Regards, Henk.



Reply via email to