I think hank was proposing that bidir relations should actually be bidir
at the time of their creation; that their direction must be stored (&
never swapped).
That is a whole new approach, am I right ?
That would mean that we need to add a direction field to insrel right?
should it ? eh .. getting confused again .. a relation is always directed from src to dst, obviously.
this is what I would expect: if a relation between 2 otypes (o1 and o2) is defined bidir, both (an instance of ) o1 or o2 could appear in src (and the instance of the other otype should appear in dst). that would effectively "store" the direction.
but this is not the current practice (if I understand correctly). it also sounds like a hardcore change, affecting the bridge.
but why would you swap fields at all ?because it already difficult enough to find relations/other nodes:)
>Node otherNode = relation.getSource() == node ? relation.getDestination() | relation.getSource();
yes .. I have such a kind of wrapper in my mmbase toolbag, along with some other obfuscating ugly evil shortcuts :-)
*pike
========= Help stop world hunger -- visit <http://www.thehungersite.org> Is The Hunger Site real? <http://www.umich.edu/~virus-busters/hunger.html>
