Revision 45119ead
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Helper/Csv/Dispatcher.pm | ||
---|---|---|
87 | 87 |
for my $step_index ( split /\.(?!\d)/, $path ) { |
88 | 88 |
my ($step, $index) = split /\./, $step_index; |
89 | 89 |
if ($cur_class->can($step)) { |
90 |
if ($cur_class->meta->relationship($step)) { #a |
|
91 |
my $next_class = $cur_class->meta->relationship($step)->class; |
|
92 |
push @{ $spec->{steps} }, [ $step, $next_class, $index ]; |
|
93 |
$cur_class = $next_class; |
|
90 |
if (my $rel = $cur_class->meta->relationship($step)) { #a |
|
91 |
if ($index && ! $rel->isa('Rose::DB::Object::Metadata::Relationship::OneToMany')) { |
|
92 |
$self->_push_error([ |
|
93 |
$path, |
|
94 |
undef, |
|
95 |
"Profile path error. Indexed relationship is not OneToMany around here: '$step_index'", |
|
96 |
undef, |
|
97 |
0, |
|
98 |
]); |
|
99 |
return; |
|
100 |
} else { |
|
101 |
my $next_class = $cur_class->meta->relationship($step)->class; |
|
102 |
push @{ $spec->{steps} }, [ $step, $next_class, $index ]; |
|
103 |
$cur_class = $next_class; |
|
104 |
} |
|
94 | 105 |
} else { # simple dispatch |
95 | 106 |
push @{ $spec->{steps} }, [ $step ]; |
96 | 107 |
last; |
Auch abrufbar als: Unified diff
Indices auf OneToOne relationships werden jetzt mit Fehler quittiert.