The code is a bit inconsistent about this. Most tests are placed in relationship/relationships.js, but some are explicit to store/relationship.js. Of course, given the assumptions behind the switch to relationship_hashes we're already effectively violating this abstraction for performance reasons. Also, if we implement issue #97 this will probably eliminate most of this need. However, any remaining type== id== tests after that should probably be moved to relationship/relationships.js for general code cleanliness.