[Bio] / Sprout / ERDB.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDB.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33, Sat Jan 28 09:36:47 2006 UTC revision 1.34, Sat Jan 28 09:54:12 2006 UTC
# Line 1114  Line 1114 
1114          my $current = pop @todoList;          my $current = pop @todoList;
1115          # Copy it into a list.          # Copy it into a list.
1116          my @stackedPath = @{$current};          my @stackedPath = @{$current};
1117            Trace("Processing path (" . join(", ", @stackedPath) . ").") if T(4);
1118          # Pull off the last item on the path. It will always be an entity.          # Pull off the last item on the path. It will always be an entity.
1119          my $entityName = pop @stackedPath;          my $entityName = pop @stackedPath;
1120          # Add it to the alreadyFound list.          # Add it to the alreadyFound list.
# Line 1130  Line 1131 
1131          # Now we need to look for relationships connected to this entity.          # Now we need to look for relationships connected to this entity.
1132          my $relationshipList = $self->{_metaData}->{Relationships};          my $relationshipList = $self->{_metaData}->{Relationships};
1133          for my $relationshipName (keys %{$relationshipList}) {          for my $relationshipName (keys %{$relationshipList}) {
1134                Trace("Checking relationship $relationshipName.") if T(4);
1135              my $relationship = $relationshipList->{$relationshipName};              my $relationship = $relationshipList->{$relationshipName};
1136              # Check the FROM field. We're only interested if it's us.              # Check the FROM field. We're only interested if it's us.
1137              if ($relationship->{from} eq $entityName) {              if ($relationship->{from} eq $entityName) {
# Line 1146  Line 1148 
1148                          # the current entity, so we need to stack it.                          # the current entity, so we need to stack it.
1149                          my @stackList = (@augmentedList, $toEntity);                          my @stackList = (@augmentedList, $toEntity);
1150                          push @fromPathList, \@stackList;                          push @fromPathList, \@stackList;
1151                        } else {
1152                            Trace("$toEntity ignored because it occurred previously.") if T(4);
1153                      }                      }
1154                  }                  }
1155              }              }
# Line 1171  Line 1175 
1175      for my $keyName ('to_link', 'from_link') {      for my $keyName ('to_link', 'from_link') {
1176          # Get the list for this key.          # Get the list for this key.
1177          my @pathList = @{$stackList{$keyName}};          my @pathList = @{$stackList{$keyName}};
1178            Trace(scalar(@pathList) . " entries in path list for $keyName.") if T(3);
1179          # Loop through this list.          # Loop through this list.
1180          while (my $path = pop @pathList) {          while (my $path = pop @pathList) {
1181              # Get the table whose rows are to be deleted.              # Get the table whose rows are to be deleted.

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3