Is there a way to ensure one object reference per record in an ActiveRecord hierarchy?
问题 It seems when I grab some hierarchical ActiveRecord structure that there are quite a few hits to the database. I improved this using the :include option to flesh out as much of the structure as possible. Even so, it seems that ActiveRecord does not map the reciprocal sides of a relationship (e.g. parent-child) with unique references to a record. That is, we get a navigable ActiveRecord structure, but one that to my knowledge doesn't guarantee a unique copy of a given record. node = Node.find