NAME
Rose::DBx::Garden::Catalyst::Object - base RDBO class
DESCRIPTION
Rose::DBx::Garden::Catalyst::Object is a subclass of Rose::DB::Object for using with YUI, RHTMLO and CatalystX::CRUD.
RDGC::Object inherits from both RDBO and RDBO::Helpers, plus adding some convenience methods of its own.
METHODS
primary_key_uri_escaped
Primary key value generator used by Rose::DBx::Garden::Catalyst-generated code.
flatten
Returns the serialized object and its immediately related objects.
exists( [ @params ] )
Returns true if the object exists in the database, false otherwise.
May be called as class or object method.
This method uses the Rose::DB::Object::Manager class to check the database based on non-unique column(s). Call it like you would load_speculative() but when you do not have a unique combination of columns (which all the load* methods require).
When called as object method, if @params is omitted, the current column values of the object are used.
Example:
# 'title' has no unique constraints on it
my $object = Object->new(title => 'Foo');
$object->save unless $object->exists;
NOTE: Using exists() as a way of enforcing data integrity is far inferior to actually placing a constraint on a table in the database. However, for things like testing and development data, it can be a useful utility method.
has_related( relationship_name )
Returns the number of related objects defined by the relationship_name accessor.
Just a wrapper around the count RDBO method type.
has_related_pages( relationship_name, page_size )
Returns the number of "pages" given page_size for the count of related object for relationship_name. Useful for creating pagers.
fetch_all
Shortcut for the Manager method get_objects().
fetch_all_iterator
Shortcut for the Manager method get_objects_iterator().
AUTHOR
Peter Karman, <karman at cpan.org>
BUGS
Please report any bugs or feature requests to bug-rose-dbx-garden-catalyst at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-DBx-Garden-Catalyst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Rose::DBx::Garden::Catalyst
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-DBx-Garden-Catalyst
Search CPAN
ACKNOWLEDGEMENTS
The Minnesota Supercomputing Institute http://www.msi.umn.edu/
sponsored the development of this software.
COPYRIGHT & LICENSE
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.