This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DataMapper | |
class Collection | |
# | |
# EagerLoader takes a QueryPath object and loads all relationships | |
# referenced in the path, into an existing Collection. | |
# | |
# Using eager-loading allows you to optimize out the classic "n+1" | |
# query problem, when you intend to iterate over several arbitrarily deeply | |
# nested relationships. One query per relationship is executed, | |
# vs one query per record. |