[Dbix-class] about "search" and "find" ...
Daniel Westermann-Clark
daniel at acceleration.net
Fri Jun 16 17:18:32 CEST 2006
On 2006-06-16 16:57:53 +0200, Daniel McBrearty wrote:
> right. but this is part of the schema, which the module already
> knows about - what is the point of passing it in here as an arg?
The documentation on find's key usage on trunk is admittedly sparse.
The gist of it is that you can tell DBIx::Class about your unique
constraints (or unique keys). Then find and friends will search on
columns matching those in the unique constraints.
Note also that the algorithm in the current development releases is
improved:
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSet.pm#find
--
Daniel Westermann-Clark
More information about the Dbix-class
mailing list