projects
/
maypole.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2af3091
)
applied patch from nicg : Modified DFV.pm to allow for multiple column primary keys
author
Aaron Trevena
<aaron.trevena@gmail.com>
Fri, 23 Mar 2007 17:57:25 +0000
(17:57 +0000)
committer
Aaron Trevena
<aaron.trevena@gmail.com>
Fri, 23 Mar 2007 17:57:25 +0000
(17:57 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@556
48953598
-375a-da11-a14b-
00016c27c3ee
lib/Maypole/Model/CDBI/DFV.pm
patch
|
blob
|
history
diff --git
a/lib/Maypole/Model/CDBI/DFV.pm
b/lib/Maypole/Model/CDBI/DFV.pm
index 7848759d610a72bc97711b175af01bd196d41704..ca3609c193578760322f983fc1eb0840426332ca 100644
(file)
--- a/
lib/Maypole/Model/CDBI/DFV.pm
+++ b/
lib/Maypole/Model/CDBI/DFV.pm
@@
-181,8
+181,16
@@
sub _do_update {
my $this_class_params = {};
+
+
+ # NG changes start here.
+ # Code below fails to handle multi col PKs
+ my @pks = $class->columns('Primary');
+
foreach my $param ( $class->columns ) {
- next if ($param eq $class->columns('Primary'));
+ # next if ($param eq $class->columns('Primary'));
+ next if grep {/^${param}$/} @pks;
+
my $value = $r->params->{$param};
next unless (defined $value);
$this_class_params->{$param} = ( $value eq '' ) ? undef : $value;