# relations that that should be done after the row is inserted into the database
# like has_many and might_have
my %post_updates;
+ my %other_methods;
my %columns_by_accessor = _get_columns_by_accessor( $self );
for my $name ( keys %$updates ) {
$columns{$name} = $updates->{$name};
next;
}
+ if( !( $source->has_relationship($name) && ref( $updates->{$name} ) ) ){
+ $other_methods{$name} = $updates->{$name};
+ }
next if !$source->has_relationship($name);
my $info = $source->relationship_info($name);
if (
for my $name ( keys %columns ) {
$object->$name( $updates->{$name} );
}
+ for my $name ( keys %other_methods) {
+ $object->$name( $updates->{$name} ) if $object->can( $name );
+ }
for my $name ( keys %pre_updates ) {
my $info = $object->result_source->relationship_info($name);
_update_relation( $self, $name, $updates, $object, $info );