Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-25 Thread Tobias Kremer
Quoting Matt S Trout [EMAIL PROTECTED]: # in MyApp::Model::Schema (which ISA Catalyst::Model::DBIC::Schema) sub new { my $self = shift-NEXT::new(@_); my ($app, $config) = @_; $self-schema-default_resultset_attributes( { cache_object = $app-cache } ); return $self; } Above

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-25 Thread Matt S Trout
On Fri, Jan 25, 2008 at 10:13:38AM +0100, Tobias Kremer wrote: Quoting Matt S Trout [EMAIL PROTECTED]: # in MyApp::Model::Schema (which ISA Catalyst::Model::DBIC::Schema) sub new { my $self = shift-NEXT::new(@_); my ($app, $config) = @_; $self-schema-default_resultset_attributes(

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-25 Thread Tobias Kremer
Quoting Matt S Trout [EMAIL PROTECTED]: On Fri, Jan 25, 2008 at 10:13:38AM +0100, Tobias Kremer wrote: Quoting Matt S Trout [EMAIL PROTECTED]: # in MyApp::Model::Schema (which ISA Catalyst::Model::DBIC::Schema) sub new { my $self = shift-NEXT::new(@_); my ($app, $config) = @_;

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-25 Thread Jonathan Rockway
Matt S Trout [EMAIL PROTECTED] writes: Yes, except using Catalyst::Component::InstancePerContext so it still behaves like a normal DBIC::Schema (i.e. you copy and modify -schema) Well, the code linked just delegates to the normal C::M::DBIC::Schema. So any changes to the behavior should go

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-25 Thread Matt S Trout
On Fri, Jan 25, 2008 at 01:07:49PM +0100, Tobias Kremer wrote: Quoting Matt S Trout [EMAIL PROTECTED]: On Fri, Jan 25, 2008 at 10:13:38AM +0100, Tobias Kremer wrote: Quoting Matt S Trout [EMAIL PROTECTED]: # in MyApp::Model::Schema (which ISA Catalyst::Model::DBIC::Schema) sub new {

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-24 Thread Tobias Kremer
Quoting Tobias Kremer [EMAIL PROTECTED]: Realizing that MyApp::Model::Schema is already just a subclass of C::M::DBIC::Schema (doh!) I came up with the following solution that just overrides new(): Hmmm ... Could somebody take a look at the following version I came up with and tell me if using

Re: [Catalyst] Accessing $schema in Model glue class (solved?)

2008-01-24 Thread Matt S Trout
On Thu, Jan 24, 2008 at 05:31:59PM +0100, Tobias Kremer wrote: Quoting Tobias Kremer [EMAIL PROTECTED]: Realizing that MyApp::Model::Schema is already just a subclass of C::M::DBIC::Schema (doh!) I came up with the following solution that just overrides new(): Hmmm ... Could somebody