Returns the primary key value, URI-escaped. If there are multiple
columns comprising the primary key, they are joined into a single
If there are no values set for any of the column(s) comprising
the primary key, returns 0.
Otherwise, returns all column values joined with ;; as per
Returns the name of the class without any leading namespace qualifier.
Similar to the DBIx::Class concept of moniker.
flatten( args )
Returns the serialized object and its immediately related objects.
As of version 0.03, this is just a wrapper around the as_tree()
Helper method with the force_load arg set to true. args
are passed directly to the as_tree() method.
Requires RDBO 0.7712 or later.
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.
# title has no unique constraints on it
my $object = Object->new(title => Foo);
$object->save unless $object->exists;
<B>NOTE:B> 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
Just a wrapper around the <B>countB> RDBO method type.
has_related_pages( relationship_name, page_size )
Returns the number of pages given page_size for the count of related
objects for relationship_name. Useful for creating pagers.