Class::DBI::Cascade::None man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

Class::DBI::Cascade::NUser3Contributed Perl DocumeClass::DBI::Cascade::None(3)

NAME
       Class::DBI::Cascade::None - Do nothing upon deletion

DESCRIPTION
       This is a Cascading Delete strategy that will do nothing, leaving
       orphaned records behind.

       It is the base class for most ofther Cascade strategies, and so
       provides several important methods:

CONSTRUCTOR
   new
	       my $strategy = Cascade::Class->new($Relationship);

       This must be instantiated with a Class::DBI::Relationship object.

METHODS
   foreign_for
	       my $iterator = $strategy->foreign_for($obj);

       This will return all the objects which are foreign to $obj across the
       relationship. It's a normal Class::DBI search you can get the results
       either as a list or as an iterator.

   cascade
	       $strategy->cascade($obj);

       Cascade across the related objects to $obj.

WRITING NEW STRATEGIES
       Creating a Cascade strategy should be fairly simple. You usually just
       need to inherit from here, and then supply a cascade() method that does
       the required thing with the results from foreign_for().

       So, for example, Cascade::Delete is implemented simply as:

	       package Class::DBI::Cascade::Delete;

	       use base 'Class::DBI::Cascade::None';

	       sub cascade {
		       my ($self, $obj) = @_;
		       $self->foreign_for($obj)->delete_all;
	       }

perl v5.14.1			  2005-09-14	  Class::DBI::Cascade::None(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net