Hi,

I've just found what I think are a couple of typos in the recent
changes to H::F::Constraint::DBIC::Unique. The attached patch
illustrates and fixes the problem. Incidentally, would there be any
interest in me adding in a couple of our local improvements to this
module, and maybe working up a test suite?

Many thanks,

Tim Rayner
Index: lib/HTML/FormFu/Constraint/DBIC/Unique.pm
===================================================================
--- lib/HTML/FormFu/Constraint/DBIC/Unique.pm   (revision 1745)
+++ lib/HTML/FormFu/Constraint/DBIC/Unique.pm   (working copy)
@@ -69,9 +69,9 @@
         
         if ( defined( my $self_stash = $stash->{ $self_stash_key } ) ) {
             
-            my ($pk) = $resultset->result_source->primary_keys;
+            my ($pk) = $resultset->result_source->primary_columns;
             
-            if ( $existing_row->$pk eq $self->stash->$pk ) {
+            if ( $existing_row->$pk eq $self_stash->$pk ) {
                 return 1;
             }
         }
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to