[Bast-commits] r5858 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual
plu at dev.catalyst.perl.org
plu at dev.catalyst.perl.org
Tue Apr 7 14:15:32 GMT 2009
Author: plu
Date: 2009-04-07 15:15:32 +0100 (Tue, 07 Apr 2009)
New Revision: 5858
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod
Log:
Added caveat notes to dual trick in cookbook
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod 2009-04-07 13:22:34 UTC (rev 5857)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod 2009-04-07 14:15:32 UTC (rev 5858)
@@ -1167,6 +1167,18 @@
while (my @vals = $cursor->next) {
print $vals[0]."\n";
}
+
+In case you're going to use this "trick" together with L<DBIx::Class::Schema/deploy> or
+L<DBIx::Class::Schema/create_ddl_dir> 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<SQL::Translator> 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<DBIx::Class::ResultClass::HashRefInflator>
More information about the Bast-commits
mailing list