Original Post
my 2cents - in the world of databases you would handle a many to many relationship by adding another table inbetween that relates the two relationships [a] 1..* [connector table] *..1 assuming you have a unique id for both a and b, you just store both in the connector table. Sorted. Infact a quick nasty hack for that in code would be to use two hash table collections in code - one for list keyed by a and the other by b. An entry in the a hashtable would point to an array of pointers to b, and visa versa. As long as you made sure the objects in the hashtables cleaned themselves out of them (via the Observer pattern or something perhaps) you'ld be sorted. Either that or refactor your data.