X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBIx%2FClass.pm;fp=lib%2FSQL%2FTranslator%2FParser%2FDBIx%2FClass.pm;h=527d5e51185d23e0ba3d64bd45a25b07036469ff;hb=31399b48455c44ca45cc1e143ae58ef0a55ce2ff;hp=1817c1cd66d4e560ede9244fefb730413995e45e;hpb=a07ae2aaf50887b2e84dd391fae1558d01c39f15;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/SQL/Translator/Parser/DBIx/Class.pm b/lib/SQL/Translator/Parser/DBIx/Class.pm index 1817c1c..527d5e5 100644 --- a/lib/SQL/Translator/Parser/DBIx/Class.pm +++ b/lib/SQL/Translator/Parser/DBIx/Class.pm @@ -57,6 +57,19 @@ sub parse { or DBIx::Class::Exception->throw("Can't load $dbicschema: $@"); } + if ( + ref $args->{dbic_schema} + and + $args->{dbic_schema}->storage + ) { + # we have a storage-holding $schema instance in $args + # we need to dissociate it from that $storage + # otherwise SQLT insanity may ensue due to how some + # serializing producers treat $args (crazy crazy shit) + local $args->{dbic_schema}{storage}; + $args->{dbic_schema} = $args->{dbic_schema}->clone; + } + my $schema = $tr->schema; my $table_no = 0;