[Bast-commits] r9328 - in DBIx-Class-Preview/1.000/trunk: .
lib/DBIx/Class/ResultSource/Table t/var
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Fri May 7 16:16:28 GMT 2010
Author: lukes
Date: 2010-05-07 17:16:28 +0100 (Fri, 07 May 2010)
New Revision: 9328
Modified:
DBIx-Class-Preview/1.000/trunk/Changes
DBIx-Class-Preview/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Previewed.pm
DBIx-Class-Preview/1.000/trunk/t/var/DBIxClass.db
Log:
Fixed problem with connecting schema without first doing ->compose_namespace
Modified: DBIx-Class-Preview/1.000/trunk/Changes
===================================================================
--- DBIx-Class-Preview/1.000/trunk/Changes 2010-05-07 16:16:03 UTC (rev 9327)
+++ DBIx-Class-Preview/1.000/trunk/Changes 2010-05-07 16:16:28 UTC (rev 9328)
@@ -1,5 +1,7 @@
Revision history for DBIx-Class-Preview
+ Fixed problem with connecting schema without first doing ->compose_namespace
+
1.000000
Initial release
Modified: DBIx-Class-Preview/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Previewed.pm
===================================================================
--- DBIx-Class-Preview/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Previewed.pm 2010-05-07 16:16:03 UTC (rev 9327)
+++ DBIx-Class-Preview/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Previewed.pm 2010-05-07 16:16:28 UTC (rev 9328)
@@ -20,6 +20,14 @@
$new_source->add_column('dirty' => { data_type => 'integer', default_value => 0 });
$new_source->add_column('deleted' => { data_type => 'integer', default_value => 0 });
$new_source->preview_table($self->from . '_preview');
+ my $target_class = $new_source->result_class . '::preview';
+ $self->inject_base(
+ $target_class => $new_source->result_class
+ );
+ $new_source->result_class( $target_class );
+ $target_class->result_source_instance($new_source)
+ if $target_class->can('result_source_instance');
+
$new_source->relationship_info($_)->{attrs}{cascade_delete} = 0
for $new_source->relationships;
my $new_source_name =
Modified: DBIx-Class-Preview/1.000/trunk/t/var/DBIxClass.db
===================================================================
(Binary files differ)
More information about the Bast-commits
mailing list