[OLINGO-713] Minor change system query options - expand

This commit is contained in:
Michael Bolz 2015-07-27 10:21:14 +02:00
parent b477bde07b
commit b146a403bb
2 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ public class DemoEdmProvider extends CsdlAbstractEdmProvider {
// navigation property: many-to-one, null not allowed (product must have a category)
CsdlNavigationProperty navProp = new CsdlNavigationProperty().setName("Category")
.setType(ET_CATEGORY_FQN).setNullable(false).setPartner("Products");
.setType(ET_CATEGORY_FQN).setNullable(false).setPartner("RelProducts");
List<CsdlNavigationProperty> navPropList = new ArrayList<CsdlNavigationProperty>();
navPropList.add(navProp);
@ -100,7 +100,7 @@ public class DemoEdmProvider extends CsdlAbstractEdmProvider {
propertyRef.setName("ID");
// navigation property: one-to-many
CsdlNavigationProperty navProp = new CsdlNavigationProperty().setName("Products")
CsdlNavigationProperty navProp = new CsdlNavigationProperty().setName("RelProducts")
.setType(ET_PRODUCT_FQN).setCollection(true).setPartner("Category");
List<CsdlNavigationProperty> navPropList = new ArrayList<CsdlNavigationProperty>();
navPropList.add(navProp);
@ -147,7 +147,7 @@ public class DemoEdmProvider extends CsdlAbstractEdmProvider {
// navigation
CsdlNavigationPropertyBinding navPropBinding = new CsdlNavigationPropertyBinding();
navPropBinding.setTarget("Products"); // the target entity set, where the navigation property points to
navPropBinding.setPath("Products"); // the path from entity type to navigation property
navPropBinding.setPath("RelProducts"); // the path from entity type to navigation property
List<CsdlNavigationPropertyBinding> navPropBindingList = new ArrayList<CsdlNavigationPropertyBinding>();
navPropBindingList.add(navPropBinding);
entitySet.setNavigationPropertyBindings(navPropBindingList);

View File

@ -31,10 +31,10 @@ under the License.
<a href="DemoService.svc/Products/?$expand=Category">Expand - /Products/?$expand=Category</a>
</li>
<li>
<a href="DemoService.svc/Categories(1)/?$expand=Products">Expand - /Categories(1)/?$expand=Products</a>
<a href="DemoService.svc/Categories(1)/?$expand=RelProducts">Expand - /Categories(1)/?$expand=RelProducts</a>
</li>
<li>
<a href="DemoService.svc/Categories/?$expand=Products">Expand - /DemoService.svc/Categories/?$expand=Products</a>
<a href="DemoService.svc/Categories/?$expand=RelProducts">Expand - /Categories/?$expand=RelProducts</a>
</li>
</ul>