How do I load an object and all associated objects? I'm asking because lazy loading (I think it's lazy loading) is causing me problems. Whilst this is a slow thing to do, it's fine as this script will only run once every 10mins.
is there something like:
Model_Object.all(load_all_now: true)
Unfortunately, there is not a good way to do that. The easiest solution is to actually query the individual records, which is of course even slower than loading all of the attributes at once with something like:
Slightly more complex, you could overload
DataMapper::Resourcewith a method like this:and then pass in something like this: