On Thursday 19 June 2003 01:08 pm, P.van Kemenade wrote:
> Hi
> 
> >> 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.

if you define the relation in to directions than it looks like this is the actual 
behaviour
so  
  <allowedrelationlist>
    <relation from="a" to="b" type="related" />
    <relation from="b" to="a" type="related" />
  </allowedrelationlist>
is maybe is wat most people want.


> 
> 
> >> 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>
> 
> 
> 

-- 
Kees Jongenburger
Mediapark C101 Hilversum  
+31 (0)35 6772910


Reply via email to