Hi,<br><br>This is exactly what I want to do, however I can't seem to get my head round how to implement this solution, I've tried various incarnations but I don'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> <<a href="mailto:juan.paredes@gmail.com">juan.paredes@gmail.com</a>> 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 <<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>> wrote:<br>><br>> package MyApp::DataStore; # or whatever this is called<br>><br>> use base qw/DBIx::Class::Schema/;
<br>><br>> __PACKAGE__->mk_group_accessors(simple => 'context');</blockquote><div><br><br>I get this bit, (also add DBIx::Class::AccessorGroup to the base class list)<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;">
> then<br>><br>> my $new = bless ...<br>></blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> $new->schema(bless(...)); # same trick on the schema
<br>><br>> $new->schema->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;">
> then in the DBIC code<br>><br>> $self->result_source->schema->context;<br>><br>> make more sense?<br>></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! 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>