From: Peter Rabbitson <ribasushi@cpan.org>
Date: Thu, 16 Jun 2011 08:27:59 +0000 (+0200)
Subject: How ::Rekey was tested against the DBIC test suite
X-Git-Tag: v0.08193~8
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=19938f3bf130db5563f6973a59dc22dd2d47fe70;p=dbsrgits%2FDBIx-Class.git

How ::Rekey was tested against the DBIC test suite
---

diff --git a/t/lib/DBICTest/BaseResult.pm b/t/lib/DBICTest/BaseResult.pm
index 4f38202..ea232e2 100644
--- a/t/lib/DBICTest/BaseResult.pm
+++ b/t/lib/DBICTest/BaseResult.pm
@@ -4,10 +4,29 @@ package #hide from pause
 use strict;
 use warnings;
 
+#use base qw/DBIx::Class::Relationship::Cascade::Rekey DBIx::Class::Core/;
 use base qw/DBIx::Class::Core/;
 use DBICTest::BaseResultSet;
 
 __PACKAGE__->table ('bogus');
 __PACKAGE__->resultset_class ('DBICTest::BaseResultSet');
 
+#sub add_relationship {
+#  my $self = shift;
+#  my $opts = $_[3] || {};
+#  if (grep { $_ eq $_[0] } qw/
+#    cds_90s cds_80s cds_84 artist_undirected_maps mapped_artists last_track
+#  /) {
+#    # nothing - join-dependent or non-cascadeable relationship
+#  }
+#  elsif ($opts->{is_foreign_key_constraint}) {
+#    $opts->{on_update} ||= 'cascade';
+#  }
+#  else {
+#    $opts->{cascade_rekey} = 1
+#      unless ref $_[2] eq 'CODE';
+#  }
+#  $self->next::method(@_[0..2], $opts);
+#}
+
 1;