On Mon, Sep 8, 2008 at 3:29 PM, Dermot <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think this is a bit of a lame question but I'll ask anyway.
>
> I have a (SQLite3) table of files. There are 4 fields as set out below.
>
> id INTEGER PRIMARY KEY,
> sub_id INTEGER,
> users_id INTEGER,
> path VARCHAR(50) UNIQUE ON CONFLICT IGNORE
>
> I have set-up beongs_to relationships between tb.files and tb.subs and
> tb.users. All is well and I can recall the list of files belonging to
> a user like this
>
> my $rs = $c->model('MyApp::Files')->find({'users_id' => $id}) # Yes
> it's a Cat app.There is something confused here. ->find does not return a list (nor a resultset - as one could infere from your naming convention). ->find returns a DBIx::Class::Row object - just one. See http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/ResultSet.pm#find If you want a list - then user search. Cheers, Zbigniew http://brudnopis.blogspot.com/ http://perlalchemy.blogspot.com/ _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
