The branch, master has been updated
- Log -----------------------------------------------------------------
commit b73ef71535c64a8a0afeef91554c1474d82c3d1b
Author: Ali Asad Lotia
Date: Mon Apr 30 10:12:02 2012 -0400
Do not map NULL values to Mongo but simply drop them, as MongoDB is schemaless.
diff --git a/Bucardo.pm b/Bucardo.pm
index 02f39ef..3222518 100644
--- a/Bucardo.pm
+++ b/Bucardo.pm
@@ -8526,7 +8526,11 @@ sub push_rows {
}
## Coerce non-strings into different objects
for my $key (keys %$object) {
- if ($goat->{columnhash}{$key}{ftype} =~ /smallint|integer|bigint/o) {
+ ## Since mongo is schemaless, don't set null columns in the mongo doc
+ if (!defined($object->{$key})) {
+ delete $object->{$key};
+ }
+ elsif ($goat->{columnhash}{$key}{ftype} =~ /smallint|integer|bigint/o) {
$object->{$key} = int $object->{$key};
}
elsif ($goat->{columnhash}{$key}{ftype} eq 'boolean') {