[Dbix-class] Question about lazy-loading of column data

Leandro Hermida leandro.hermida at unibas.ch
Tue Feb 7 12:31:38 CET 2006


Hello,

I have tried to look at all of the DBIx::Class docs to find if it is
possible to "lazy-load" or "load-on-demand" a certain column in a table
using the DBIx::Class::Schema approach.  I have a DATA_FILE table with a
very large BLOB/CLOB column holding the contents.  If I were to pull out a
collection of DATA_FILE objects like:

my @data_files = $schema->resultset('DataFile')->all();

I wouldn't like the "contents" accessor for each object in the collection to
be populated until I explcitly call $data_file->contents on a particular
DATA_FILE object.  Is this possible with the DBIx::Class::Schema approach?

Cheers,

Leandro Hermida





More information about the Dbix-class mailing list