From: Johannes Plunien Date: Tue, 7 Apr 2009 14:15:32 +0000 (+0000) Subject: Added caveat notes to dual trick in cookbook X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=336256bc90f8b0493251c4fd7d88c3cdf02f636c;p=dbsrgits%2FDBIx-Class-Historic.git Added caveat notes to dual trick in cookbook --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 03db014..fae1e94 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -1167,6 +1167,18 @@ Or use C while (my @vals = $cursor->next) { print $vals[0]."\n"; } + +In case you're going to use this "trick" together with L or +L a table called "dual" will be created in your +current schema. This would overlap "sys.dual" and you could not fetch "sysdate" or +"sequence.nextval" anymore from dual. To avoid this problem, just tell +L to not create table dual: + + my $sqlt_args = { + add_drop_table => 1, + parser_args => { sources => [ grep $_ ne 'Dual', schema->sources ] }, + }; + $schema->create_ddl_dir( [qw/Oracle/], undef, './sql', undef, $sqlt_args ); Or use L