[Dbix-class] weird result_source_instance problem
Tobias Kremer
list at funkreich.de
Thu May 24 14:18:46 GMT 2007
> The problem is that even calls on MyApp::Schema::User ResultSets to
> standard relationships defined via has_many trigger the execution of the
> manually added ResultSource above - which of course fails with a
> "called with x bind variables when y are needed" error message.
Correction: Calls to standard relationships DO work fine but I have custom
methods in MyApp::Schema::User that use these relationships and they stop
working:
sub custom_relationship {
my( $self ) = @_;
return $self->some_relation( { field => 'value' } )
}
I suppose at some point DBIC mixes up MyApp::Schema::User and MyResultSource
(which is only an instance of MyApp::Schema::User and thus has all my custom
methods, too). But I don't know how to fix this ...
--Tobias
More information about the Dbix-class
mailing list