[Dbix-class] Auto-generate random primary keys
Bernhard Graf
dbic at augensalat.de
Tue Feb 28 15:55:08 CET 2006
Hi,
I just started playing around with DBIC.
Some tables in my db have random primary keys created by eg.
Digest::MD5::md5_hex($$, rand, time).
Is there a recommended way to do this?
I thought of a DBIC::PK::Auto::MD5 class, with an insert() that does
basically:
my $self = shift;
$self->store_column(md5_hex($$, rand, time));
$self->next::method(@_);
Is that an appropriate approach?
And how to load custom components not living in the DBIx::Class
namespace?
--
Bernhard Graf
More information about the Dbix-class
mailing list