[Dbix-class] Using result_source for custom query breaks with
->deploy
J. Shirley
jshirley at gmail.com
Thu Jan 31 15:10:15 GMT 2008
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.
=3D=3D=3D lib/SQL/Translator/Parser/DBIx/Class.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- lib/SQL/Translator/Parser/DBIx/Class.pm (revision 3808)
+++ lib/SQL/Translator/Parser/DBIx/Class.pm (local)
@@ -70,11 +70,17 @@
my $source =3D $dbixschema->source($moniker);
next if $seen_tables{$source->name}++;
+ # Not a traditional table
+ next if ref $source->name;
my $table =3D $schema->add_table(
name =3D> $source->name,
Comments?
-J
-- =
J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080131/d0b=
b1dbe/attachment.htm
More information about the DBIx-Class
mailing list