From b7dcae862ae226b1f2da43270418e14199af1a06 Mon Sep 17 00:00:00 2001 From: Christia Holzer Date: Tue, 29 Sep 2015 15:44:10 +0200 Subject: [PATCH] [OLINGO-781] TecSvc: The atom id for functions without entity set is calculated by the URI of the function --- .../tecsvc/processor/TechnicalEntityProcessor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java index 59d9a2ac0..b9afddd39 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java @@ -506,8 +506,15 @@ public class TechnicalEntityProcessor extends TechnicalProcessor expand); expandHandler.applyExpandQueryOptions(entitySetSerialization, edmEntitySet, expand); final CountOption countOption = uriInfo.getCountOption(); + + String id; + if(edmEntitySet == null) { + // Used for functions, function imports etc. + id = request.getRawODataPath(); + } else { + id = request.getRawBaseUri() + edmEntitySet.getName(); + } - final String id = request.getRawBaseUri() + edmEntitySet.getName(); // Serialize final SerializerResult serializerResult = (isReference) ? serializeReferenceCollection(entitySetSerialization, edmEntitySet, requestedContentType, countOption) :