Permalink
Browse files

Merge pull request #9 from dvs/master

add_association - bugfix, sort the SQL arguments
  • Loading branch information...
2 parents 3688b9c + d2cb892 commit 9d1f5a1d5f29579353d58597b501c6aeffc4771d @hlapp hlapp committed Dec 3, 2015
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Bio/DB/BioSQL/BaseDriver.pm
  2. +1 −1 lib/Bio/DB/BioSQL/BasePersistenceAdaptor.pm
@@ -596,7 +596,7 @@ sub prepare_insert_association_sth {
# now add the columns for values if any
if ($values) {
- foreach my $colkey ( keys %$values ) {
+ foreach my $colkey ( sort keys %$values ) {
$self->throw("unmapped association column $colkey")
unless exists( $columnmap->{$colkey} );
$attr = $columnmap->{$colkey};
@@ -419,7 +419,7 @@ sub add_association{
my $dbd = $self->dbd();
$columnmap = $dbd->slot_attribute_map(
$dbd->association_table_name($objs));
- foreach my $valkey (keys %$values) {
+ foreach my $valkey (sort keys %$values) {
if($columnmap->{$valkey}) {
$self->debug(substr(ref($self),rindex(ref($self),"::")+2).
"::add_assoc: ".

0 comments on commit 9d1f5a1

Please sign in to comment.