Poking about in og/relation/* and experimenting as I try to unravel this
for http://robmela.com/cheatsheets/og_relations ( hopefully in a form
that can be used in the rdocs for og or relation )
BelongsTo inherits from RefersTo but with this annotation in “enchant”
target_class.ann!(:self)[:descendants] ||= []
target_class.ann!(:self, :descendants) << [owner_class, foreign_key]
Something similar shows up in JoinsMany with a comment:
# Add join class to ann(:descendants) to be able to use cascade
deletes.
owner_class.ann!(:self)[:descendants] ||= []
owner_class.ann!(:self, :descendants) << [tmp_join_class,
owner_key]
Is there a lack of symmetry here?
RefersTo <= BelongsTo, with descendants annotation on the latter
JoinsMany <= ManyToMany, with annotation on the former