[Bast-commits] r4652 -
DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Jul 26 00:20:12 BST 2008
Author: rafl
Date: 2008-07-26 00:20:12 +0100 (Sat, 26 Jul 2008)
New Revision: 4652
Modified:
DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm
Log:
Croak on compound primary keys.
Modified: DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm
===================================================================
--- DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm 2008-07-25 23:20:05 UTC (rev 4651)
+++ DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm 2008-07-25 23:20:12 UTC (rev 4652)
@@ -77,6 +77,16 @@
return $class->_tree_columns;
}
+sub set_primary_key {
+ my $self = shift;
+
+ if (@_ > 1) {
+ croak('Only single column primary keys are supported for nested set tree classes');
+ }
+
+ return $self->next::method(@_);
+}
+
sub insert {
my ($self, @args) = @_;
More information about the Bast-commits
mailing list