[Maypole] edit by unique field
Kevin Connor
kconnor@proofpoint.com
Tue, 05 Oct 2004 13:44:51 -0700
out-of-the-box Maypole provides edit functionality using a numeric
primary key in the url:
beerdb/beer/edit/1
I'd like to support url's of the following form:
beerdb/beer/edit/amberlight
(presuming amberlight is the value for a unique field)
I'm thinking along REST principles. It should bring up the add new page
if the value doesn't exist.
Anyway, it seems like to do it would mean overriding $class->retrieve.
see the call to
my $obj = $class->retrieve( $r->{args}->[0] );
within
Maypole::Model::Base::process
Thoughts? Is this documented somewhere I've missed?
-Kevin Connor