Prefetching and caching persistent objects is disclosed. The system
creates a structure context used to identify a set containing a first
object and other related objects. The objects have attributes, where each
attribute is identified by a name. Upon a fetch of an attribute in the
first object, the system also fetches related data. The related data
includes other attributes in the object, and attributes in the other
objects of the set having the same name as the attribute fetched for the
first object.