I used ODataService sample for this scenario. (Both implicit and explicit models)
Notice the 'rel' links in the Response message.
Expected:
'rel' for Supplier : http://kirandesktop:50231/ProductFamilies(2)/Supplier
'rel' for Products : http://kirandesktop:50231/ProductFamilies(2)/Products
Actual:
'rel' for Supplier : http://kirandesktop:50231/Products(49)/Family
'rel' for Products : http://kirandesktop:50231/Products(49)/Family
Request
-------
GET http://kirandesktop:50231/Products(49)/Family HTTP/1.1
User-Agent: Fiddler
Host: kirandesktop:50231
Response
---------
HTTP/1.1 200 OK
Content-Length: 1487
Content-Type: application/atom+xml; type=entry
Server: Microsoft-HTTPAPI/2.0
DataServiceVersion: 3.0;
Date: Fri, 05 Oct 2012 18:45:13 GMT
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://kirandesktop:50231/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>http://kirandesktop:50231/ProductFamilies(2)</id>
<category term="ODataService.Models.ProductFamily" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="http://kirandesktop:50231/ProductFamilies(2)" />
<link rel="self" href="http://kirandesktop:50231/ProductFamilies(2)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier" type="application/atom+xml;type=entry" title="Supplier" href="http://kirandesktop:50231/Products(49)/Family" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products" type="application/atom+xml;type=feed" title="Products" href="http://kirandesktop:50231/Products(49)/Family" />
<title />
<updated>2012-10-05T18:45:12Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:ID m:type="Edm.Int32">2</d:ID>
<d:Name>Windows</d:Name>
<d:Description>Operating System with a graphical user interface</d:Description>
<d:LongProperty m:type="Edm.Int64">0</d:LongProperty>
</m:properties>
</content>
</entry>
Comments: Verified.
Notice the 'rel' links in the Response message.
Expected:
'rel' for Supplier : http://kirandesktop:50231/ProductFamilies(2)/Supplier
'rel' for Products : http://kirandesktop:50231/ProductFamilies(2)/Products
Actual:
'rel' for Supplier : http://kirandesktop:50231/Products(49)/Family
'rel' for Products : http://kirandesktop:50231/Products(49)/Family
Request
-------
GET http://kirandesktop:50231/Products(49)/Family HTTP/1.1
User-Agent: Fiddler
Host: kirandesktop:50231
Response
---------
HTTP/1.1 200 OK
Content-Length: 1487
Content-Type: application/atom+xml; type=entry
Server: Microsoft-HTTPAPI/2.0
DataServiceVersion: 3.0;
Date: Fri, 05 Oct 2012 18:45:13 GMT
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://kirandesktop:50231/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>http://kirandesktop:50231/ProductFamilies(2)</id>
<category term="ODataService.Models.ProductFamily" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="http://kirandesktop:50231/ProductFamilies(2)" />
<link rel="self" href="http://kirandesktop:50231/ProductFamilies(2)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier" type="application/atom+xml;type=entry" title="Supplier" href="http://kirandesktop:50231/Products(49)/Family" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products" type="application/atom+xml;type=feed" title="Products" href="http://kirandesktop:50231/Products(49)/Family" />
<title />
<updated>2012-10-05T18:45:12Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:ID m:type="Edm.Int32">2</d:ID>
<d:Name>Windows</d:Name>
<d:Description>Operating System with a graphical user interface</d:Description>
<d:LongProperty m:type="Edm.Int64">0</d:LongProperty>
</m:properties>
</content>
</entry>
Comments: Verified.