On Wed, Sep 03, 2008 at 09:04:23AM +0200, Emmanuel Quevillon wrote:
> You need to perform a search in your 'ShowData' function to get data
> returned by the Resultset of your model 'Ttrack::Ttrack'.
> At this time, $data is only a resultset object without any data in it.
> Replace :
> 
> my $data = $c->model('Ttrack::Ttrack');
> 
> with
> 
> my $data = $c->model('Ttrack::Ttrack')->search();

No, don't do that.

Those two lines are exactly equivalent except that ->search will cause
a completely pointless clone of the resultset.

$c->model('Ttrack::Ttrack') is -already- a resultset for the whole table.

That's why there's something in there to search on.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to