Example
I have a table that might_have an expansion board; an expansion board has_many locks
Is it possible to when the might_have is first accessed to prefetch the locks?
(Yes I know that when I get the table I can prefetch the board and it's locks; just wondering if I have to do it this way.)
package Table;
__PACKAGE__->might_have("expansion_board", "ExpansionBoard",
{ "foreign.boardid" => "self.boardid" });
#etc.
package ExpansionBoard;
__PACKAGE__->has_many("locks","Lock",
{ "foreign.boardid" => "self.boardid" },
undef);
#etc.
package Lock;
#etc.
I would most like that $table->expansion_board on first access to also load in it's locks from the database.