[Catalyst] Inconsistency when retrieving objects from stash

Ian Sillitoe ian at sillit.com
Fri Apr 25 20:06:35 GMT 2014

Hi David,

Not obvious why the problem isn't reproducible, but if you're using a
DBIC::ResultSet directly in TT then it would be worth trying to confirm
that $sub_id is definitely what you think it is (i.e. an integer rather
than an object).

[% USE Dumper %]
[% IF search.submission.sub_id != submission.sub_id %]
  <pre>SCH-SUB-ID: [% Dumper.dump( search.submission.sub_id ) %]</pre>
  <pre>SUB-ID: [% Dumper.dump( submission.sub_id ) %]</pre>
  [% THROW mismatch "Fatal Error SCH-SUB-ID != SUB-ID" %]
[% END %]

As a general rule, I would try and flatten DBIC objects into a simple data
structure in your Controller and take as much business logic as possible
out of your view.



Dr Ian Sillitoe
Orengo Group, Structural and Molecular Biology
University College London
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20140425/b3a9e88b/attachment.htm>

More information about the Catalyst mailing list