You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/09/17 14:00:08 UTC
svn commit: r1703583 -
/olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext
Author: chrish
Date: Thu Sep 17 12:00:07 2015
New Revision: 1703583
URL: http://svn.apache.org/r1703583
Log:
CMS commit to olingo by chrish
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext
Modified: olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext
URL: http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext?rev=1703583&r1=1703582&r2=1703583&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext (original)
+++ olingo/site/trunk/content/doc/odata4/tutorials/sqo_es/tutorial_sqo_es.mdtext Thu Sep 17 12:00:07 2015
@@ -392,10 +392,12 @@ Also, the `expandOption` has to be consi
// make sure that `$expand` and $select are considered by the serializer
// adding the selectOption to the serializerOpts will actually tell the lib to do the job
+ final String id = request.getRawBaseUri() + "/" + edmEntitySet.getName();
EntitySerializerOptions opts = EntitySerializerOptions.with()
.contextURL(contextUrl)
.select(selectOption)
.expand(expandOption)
+ .id(id)
.build();
@@ -577,17 +579,20 @@ In this tutorial we have learned the bas
Link link = new Link();
link.setTitle(navPropName);
link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
-
+ link.setRel(Constants.NS_ASSOCIATION_LINK_REL + navPropName);
+
if(edmNavigationProperty.isCollection()){ // in case of Categories(1)/$expand=Products
// fetch the data for the $expand (to-many navigation) from backend
// here we get the data for the expand
EntityCollection expandEntityCollection = storage.getRelatedEntityCollection(entity, expandEdmEntityType);
link.setInlineEntitySet(expandEntityCollection);
+ link.setHref(expandEntityCollection.getId().toASCIIString());
} else { // in case of Products(1)?$expand=Category
// fetch the data for the $expand (to-one navigation) from backend
// here we get the data for the expand
Entity expandEntity = storage.getRelatedEntity(entity, expandEdmEntityType);
link.setInlineEntity(expandEntity);
+ link.setHref(expandEntity.getId().toASCIIString());
}
// set the link - containing the expanded data - to the current entity