[Dbix-class] search vs. find

Leo Cacciari leo.cacciari at gmail.com
Thu Jun 7 09:11:07 GMT 2007


Il giorno mer, 06/06/2007 alle 18.00 -0400, John Goulah ha scritto:
> 
> Its not that I didn't like the answers or said they were "fake", its
> that they were just reiterating something I had already stated so they
> were quite obvious.  If you read my post I did say: "this makes some
> sense since search may return many rows while find is designed to find
> one row."  
> 

Hmmmm well, as far as I'm concerned, DBIC does the "right thing"(tm). I
simply hate interfaces such as jdbc returning a result set containing
only one element. With this approach, I'm obliged to add a call to some
methods to extract the (unique) record contained in the record set. I
strongly oppose the extra work needed by that: truly a perl programmer
I'm really lazy (well, I'm lazy, whenever I'm a real perl programmer is
to be discussed. But I'm lazy:)). 
Moreover, it seems to me that the answers where to the point: if you
want a resultset use search. And let people like me use find :)

-- 
Leo "TheHobbit" Cacciari


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070607/b633dfd9/attachment.pgp


More information about the Dbix-class mailing list