SPOPS::Tool::DBI::FindDefaults - Load default values from a particular record


SPOPS documentation  | view source Contained in the SPOPS distribution.

Index


NAME

Top

SPOPS::Tool::DBI::FindDefaults - Load default values from a particular record

SYNOPSIS

Top

 # Load information from record 4 for fields 'language' and 'country'

 my $spops = {
    class               => 'This::Class',
    isa                 => [ 'SPOPS::DBI' ],
    field               => [ 'email', 'language', 'country' ],
    id_field            => 'email',
    base_table          => 'test_table',
    rules_from          => [ 'SPOPS::Tool::DBI::FindDefaults' ],
    find_default_id     => 4,
    find_default_fields => [ 'language', 'country' ],
 };

DESCRIPTION

Top

This class allows you to specify default values based on the information in a particular record in the database. Just specify the ID of the record and the fields which you want to copy as defaults.

METHODS

Top

behavior_factory()

Loads the behavior during the SPOPS::ClassFactory process.

find_defaults()

Retrieve the defaults from the database.

BUGS

Top

None known.

TO DO

Top

Nothing known.

SEE ALSO

Top

SPOPS::Manual::ObjectRules (SPOPS::Manual::ObjectRules)

SPOPS::ClassFactory

POOP Group mailing list thread:

  http://www.geocrawler.com/lists/3/SourceForge/3024/0/6867367/

COPYRIGHT

Top

AUTHORS

Top

Chris Winters <chris@cwinters.com>


SPOPS documentation  | view source Contained in the SPOPS distribution.