+
+ my @rel_cols = keys %{ $info->{cond} };
+ map {s/^foreign\.//} @rel_cols;
+
+ #warn "REL_COLS: " . Dumper(@rel_cols); use Data::Dumper;
+ my $rel_col_cnt = scalar @rel_cols;
+
+ # find out if all related columns are nullable
+ my $all_fks_nullable = 1;
+ for my $rel_col (@rel_cols) {
+ $all_fks_nullable = 0
+ unless $related_resultset->result_source->column_info($rel_col)
+ ->{is_nullable};
+ }
+
+ $if_not_submitted = $all_fks_nullable ? 'nullify' : 'delete'
+ unless defined $if_not_submitted;
+
+ #warn "\tNULLABLE: $all_fks_nullable ACTION: $if_not_submitted\n";
+
+ #warn "RELINFO for $name: " . Dumper($info); use Data::Dumper;
+
+ # the only valid datatype for a has_many rels is an arrayref
+ if ( $info->{attrs}{accessor} eq 'multi' ) {
+
+ # handle undef like empty arrayref
+ $updates = []
+ unless defined $updates;
+ $self->throw_exception(
+ "data for has_many relationship '$name' must be an arrayref")
+ unless ref $updates eq 'ARRAY';
+
+ my @updated_objs;
+
+ #warn "\tupdating has_many rel '$name' ($rel_col_cnt columns cols)\n";
+ for my $sub_updates ( @{$updates} ) {