I have manually set up a ResultSource using result_source_instance in one of my DBIC Schema classes called MyApp::Schema::User:
my $source = __PACKAGE__->result_source_instance(); my $my_source = $source->new( $source ); $my_source->source_name( 'MyResultSource' ); my $sql = "...complex-sql-with-various-bind-parameters..."; $my_source->name( \"(${sql})" ); MyApp::Schema->register_source( 'MyResultSource' => $my_source ); Everything worked great until I recently tried to add another class to my schema. Even after introducing the result_source_instance magic shown above I was able to successfully add new classes to my schema. But now it seems that I can't have more than 14 classes in my schema. I know this sounds stupid but as soon as I delete an existing class and afterwards add a new one it works fine - as long as I stay below 14 classes in total. 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. Any ideas what could be causing this strange behaviour? Thanks a lot! --Tobias _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/