| CatalystX-CRUD-Model-RDBO documentation | Contained in the CatalystX-CRUD-Model-RDBO distribution. |
CatalystX::CRUD::Object::RDBO - Rose::DB::Object implementation of CatalystX::CRUD::Object
# fetch a row from MyApp::Model::Foo (which isa CatalystX::CRUD::Model)
my $foo = $c->model('Foo')->fetch( id => 1234 );
$foo->create;
$foo->read;
$foo->update;
$foo->delete;
CatalystX::CRUD::Object::RDBO implements the required CRUD methods of a CatalystX::CRUD::Object subclass. It is intended for use with CatalystX::CRUD::Model::RDBO.
Only new or overridden methods are documented here.
Calls load( speculative => 1 ) on the internal delegate() value.
Calls delegate->save().
Calls delegate->load(). NOTE: If you need a speculative load, use load_speculative() instead.
Calls delegate->save().
Calls delegate->delete(@_).
Peter Karman, <karman at cpan.org>
Please report any bugs or feature requests to
bug-catalystx-crud-model-rdbo at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD-Model-RDBO.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc CatalystX::CRUD::Model::RDBO
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CatalystX-CRUD-Model-RDBO
This module is based on Catalyst::Model::RDBO by the same author.
Copyright 2007 Peter Karman, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| CatalystX-CRUD-Model-RDBO documentation | Contained in the CatalystX-CRUD-Model-RDBO distribution. |
package CatalystX::CRUD::Object::RDBO; use strict; use warnings; use base qw( CatalystX::CRUD::Object ); our $VERSION = '0.22';
# convenience methods sub load_speculative { shift->delegate->load( speculative => 1, @_ ); }
# required methods sub create { shift->delegate->save(@_); }
sub read { # because of the abusive way RDBO handles load() internally, # must re-assign to delegate afterwards. This fixes esp the issue # of passing 'with' => 'rel' to load(). my $cxcobj = shift; my $rdbo = $cxcobj->delegate; $rdbo->load(@_); $cxcobj->{delegate} = $rdbo; return $cxcobj; }
sub update { shift->delegate->save(@_); }
sub delete { shift->delegate->delete(@_); } 1; __END__