J. Shirley wrote: > Hey all, > > Easy patch for this, but wanted to make sure that I wasn't missing > anything at all. I have a custom result source instance to do a big > query (subselect) as what is described in the cookbook. > > Works like a champ. Except, I can't ->deploy anymore. When it > iterates through the tables (unless I specify which) it gets to this > instance and does: > CREATE TABLE SCALAR(0x8153720) ... > > That obviously doesn't work. The quick fix to make this work is to > just skip if the name of the source is a ref rather than a scalar. > > === lib/SQL/Translator/Parser/DBIx/Class.pm > ================================================================== > --- lib/SQL/Translator/Parser/DBIx/Class.pm (revision 3808) > +++ lib/SQL/Translator/Parser/DBIx/Class.pm (local) > @@ -70,11 +70,17 @@ > my $source = $dbixschema->source($moniker); > > next if $seen_tables{$source->name}++; > + # Not a traditional table > + next if ref $source->name; > > my $table = $schema->add_table( > name => $source->name, > > Comments? > Does it matter if %seen_tables gets a "SCALAR(0xdeadbeef)" key?
Matt _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]