On Fri, Aug 28, 2009 at 16:02, Steve<
[hidden email]> wrote:
> I've been trying to learn Catalyst, but realize that I probably have to
> become more familiar with DBIC first. Anyway, I'm trying to write a method
> in my 'Divisions' class of which one attribute is called 'divisionname'.
> How can I write a sub called 'default' that will look in this table to find
> the one and only one record whose 'divisionname' is 'DEFAULT'? FYI, I've
> successfully used this class to search the resultset, but don't see how to
> search within my own class.
Your "class" is actually the class of the row object. Rows cannot
search - they solely exist to allow manipulation of a row. You don't
get from the row back to the resultset. You want to add a method to
the resultset for that table.
Rob
_______________________________________________
List:
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-classIRC: irc.perl.org#dbix-class
SVN:
http://dev.catalyst.perl.org/repos/bast/DBIx-Class/Searchable Archive:
http://www.grokbase.com/group/dbix-class@...