Hi,<br><br>This is exactly what I want to do, however I can&#39;t seem to get my head round how to implement this solution, I&#39;ve tried various incarnations but I don&#39;t seem to be getting anywhere.<br><br>Annotations below, thanks for patience.
<br><br>Scott<br><br><br><div><span class="gmail_quote">On 2/1/07, <b class="gmail_sendername">Juan Miguel Paredes</b> &lt;<a href="mailto:juan.paredes@gmail.com">juan.paredes@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 2/1/07, Matt S Trout &lt;<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>&gt; wrote:<br>&gt;<br>&gt; package MyApp::DataStore; # or whatever this is called<br>&gt;<br>&gt; use base qw/DBIx::Class::Schema/;
<br>&gt;<br>&gt; __PACKAGE__-&gt;mk_group_accessors(simple =&gt; &#39;context&#39;);</blockquote><div><br><br>I get this bit, (also add DBIx::Class::AccessorGroup to the base class list)<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; then<br>&gt;<br>&gt; my $new = bless ...<br>&gt;</blockquote><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; $new-&gt;schema(bless(...)); # same trick on the schema
<br>&gt;<br>&gt; $new-&gt;schema-&gt;context($c);</blockquote><div><br>Is the above in the same file? what should replace the ellipsis<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; then in the DBIC code<br>&gt;<br>&gt; $self-&gt;result_source-&gt;schema-&gt;context;<br>&gt;<br>&gt; make more sense?<br>&gt;</blockquote><div><br>Where exactly is the DBIC code? MyApp::Model::DataStore?<br></div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Indeed, your suggestion worked fine, thanks a lot!&nbsp;&nbsp;Just had to add<br>DBIx::Class::AccessorGroup to the schema class
<br><br>Regards,<br><br>Juan.<br><br>_______________________________________________<br>List: <a href="mailto:Catalyst@lists.rawmode.org">Catalyst@lists.rawmode.org</a><br>Listinfo: <a href="http://lists.rawmode.org/mailman/listinfo/catalyst">
http://lists.rawmode.org/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.rawmode.org/">http://www.mail-archive.com/catalyst@lists.rawmode.org/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/">
http://dev.catalyst.perl.org/</a><br></blockquote></div><br>