NAME

DustyDB::FakeRecord - helper class for dealing with deferred loading

VERSION

version 0.06

DESCRIPTION

Do not use this class yourself. Everything you need to use this is done for you.

This class is used to provide deferred loading of FK objects. Essentially, if you link from one model to another in a stored attribute, this class is used to make sure we we don't load that other class until we need it. This prevents recursion during loads (which is kind of a bug, but this works around this bug too) and prevents us from having to load a whole bunch of records we might not use.

ATTRIBUTE

model

This is the model that should be used to retrieve the actual object when it needs to be vivified.

class_name

This is the class name of the model that will be vivified.

key

This is the key-value pairs needed to load the object during vivification.

METHODS

isa

We implement a custom isa to keep Moose from complaining when we try to store something that isn't the same type as the object we need to store.

vivify

This is used to load the object on demand.