Skip to content

Commit

Permalink
Fixed aggregate references
Browse files Browse the repository at this point in the history
  • Loading branch information
hylkevds committed Jul 25, 2023
1 parent c05e9a3 commit a599e4e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,14 @@ private void checkReferenceFromDs(Entity sourceDs, Entity aggregateMds, Aggregat
String aggKey = null;
Object aggId = null;
if (sourceEqualsTarget) {
expectedAggFor = "/Datastreams(" + formatKeyValuesForUrl(sourceDs.getPrimaryKeyValues()) + ")";
final Object[] primaryKeyValues = sourceDs.getPrimaryKeyValues();
expectedAggFor = "/Datastreams(" + formatKeyValuesForUrl(primaryKeyValues) + ")";
aggKey = KEY_AGGREGATE_SOURCE_D;
aggId = formatKeyValuesForUrl(sourceDs.getPrimaryKeyValues());
if (primaryKeyValues.length == 1) {
aggId = primaryKeyValues[0];
} else {
aggId = formatKeyValuesForUrl(primaryKeyValues);
}
} else {
expectedAggFor = sourceDs.getSelfLink();
}
Expand Down

0 comments on commit a599e4e

Please sign in to comment.