From: Pit Capitain Date: 2007-07-26T01:25:44+09:00 Subject: Re: Bidirectionnal relation 2007/7/24, dohzya : > I have a problem with bidirectional relations : how to implements it ? > (...) > If anyone has a suggestion (solution or link or anything) to implement > transparent bidirectional relation... :) Hi Etienne, in ruby-talk:121602 I posted a little library to implement this. Here's your example: require "relation" class Entity end Relation.new Entity, :one, :mother, Entity, :many, :daughters a = Entity.new b = Entity.new a.mother = b puts(b.daughters.include?(a)) # => true a.daughters << b puts(b.mother == a) # => true If you find nothing else maybe I should create my first gem... Regards, Pit