[Dbix-class] Auto-generate random primary keys

Bernhard Graf dbic at augensalat.de
Wed Mar 1 16:59:45 CET 2006


Matt S Trout wrote:
> On Wed, Mar 01, 2006 at 03:14:29PM +0100, Bernhard Graf wrote:
> > Matt S Trout wrote:
> > > It's broken.
> > >
> > > } while ($self->search({$column => $val}));
> > >
> > > should be
> > >
> > > } while ($self->result_source->resultset->search({$column =>
> > > $val}));
> >
> > Very sophisticated. ;-)
> >
> > Unfortunately this results in an infinite loop.
>
> Not enough coffee, sorry.
>
> > $self->result_source->resultset->search({$column => $val})->next
> > works.
>
> Or ->count, which is probably more efficient.

Too late ;-). I just filed a bug report and patch to rt.cpan.org.
http://rt.cpan.org/Public/Bug/Display.html?id=17917
-- 
Bernhard Graf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060301/0682c34c/attachment.pgp 


More information about the Dbix-class mailing list