Hello, I've been reading the docs and forums searching for an easy way to eagerly load an association, but I haven't found one yet.
Here are my models: class Departamento include DataMapper::Resource #... has n, :points end class Point include DataMapper::Resource #... belongs_to :departamento end Here is what I want to do: Departamento.all(:include => [:points]).to_json I realize that include is not an option for the all method, but what is the best way to do this with Datamapper? I know that Datamapper loads associations lazily but I need to eagerly load the points association this time. Please let me know. Thanks, Ernesto -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
