Changeset 1870


Ignore:
Timestamp:
12/22/16 11:01:32 (7 years ago)
Author:
nanardon
Message:

Ensure alias using cross object reference are updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1865 r1870  
    715715    } 
    716716 
     717 
     718    foreach my $attr (@updated_attributes) { 
     719        my $oattr = $self->attribute($attr); 
     720        my $ref = $oattr->reference or next; 
     721        my $attrref = sprintf('oalias=%s.%s.%s', $self->type, $self->id, $attr); 
     722        foreach my $alias ($self->base->search_objects($ref, $attrref)) { 
     723            my $olias = $self->base->GetAlias($ref, $alias) or next; 
     724            $olias->_update_aliases_ptr; 
     725        } 
     726    } 
     727 
    717728    delete($self->base->{__cache}{"_" . $self->type}{$self->id}); 
    718729    scalar(@updated_attributes); 
Note: See TracChangeset for help on using the changeset viewer.