http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonRoom_InlineEmployeesToTeam.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonRoom_InlineEmployeesToTeam.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonRoom_InlineEmployeesToTeam.json
new file mode 100644
index 0000000..979e39a
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonRoom_InlineEmployeesToTeam.json
@@ -0,0 +1,79 @@
+{
+  "d": {
+    "__metadata": {
+      "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+      "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+      "type": "RefScenario.Room",
+      "etag": "W/\"1\""
+    },
+    "Id": "1",
+    "Name": "Room 1",
+    "Seats": 1,
+    "Version": 1,
+    "nr_Employees": {
+      "results": [
+        {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+            "type": "RefScenario.Employee",
+            "content_type": "image/jpeg",
+            "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value",
+            "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value"
+          },
+          "EmployeeId": "1",
+          "EmployeeName": "Walter Winter",
+          "ManagerId": "1",
+          "RoomId": "1",
+          "TeamId": "1",
+          "Location": {
+            "__metadata": {
+              "type": "RefScenario.c_Location"
+            },
+            "City": {
+              "__metadata": {
+                "type": "RefScenario.c_City"
+              },
+              "PostalCode": "69124",
+              "CityName": "Heidelberg"
+            },
+            "Country": "Germany"
+          },
+          "Age": 52,
+          "EntryDate": "/Date(915148800000)/",
+          "ImageUrl": "Employees('1')/$value",
+          "ne_Manager": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Manager"
+            }
+          },
+          "ne_Team": {
+            "__metadata": {
+              "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+              "type": "RefScenario.Team"
+            },
+            "Id": "1",
+            "Name": "Team 1",
+            "isScrumTeam": false,
+            "nt_Employees": {
+              "__deferred": {
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')/nt_Employees"
+              }
+            }
+          },
+          "ne_Room": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Room"
+            }
+          }
+        }
+      ]
+    },
+    "nr_Building": {
+      "__deferred": {
+        "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')/nr_Building"
+      }
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonRoomsToEmployeesWithInlineTeams.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonRoomsToEmployeesWithInlineTeams.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonRoomsToEmployeesWithInlineTeams.json
new file mode 100644
index 0000000..671dbb6
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonRoomsToEmployeesWithInlineTeams.json
@@ -0,0 +1,118 @@
+{
+  "d": {
+    "results": [
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+          "type": "RefScenario.Employee",
+          "content_type": "image/jpeg",
+          "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value",
+          "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value"
+        },
+        "EmployeeId": "2",
+        "EmployeeName": "Frederic Fall",
+        "ManagerId": "1",
+        "RoomId": "2",
+        "TeamId": "1",
+        "Location": {
+          "__metadata": {
+            "type": "RefScenario.c_Location"
+          },
+          "City": {
+            "__metadata": {
+              "type": "RefScenario.c_City"
+            },
+            "PostalCode": "69190",
+            "CityName": "Walldorf"
+          },
+          "Country": "Germany"
+        },
+        "Age": 32,
+        "EntryDate": "/Date(1057017600000)/",
+        "ImageUrl": "Employees('2')/$value",
+        "ne_Manager": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Manager"
+          }
+        },
+        "ne_Team": {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+            "type": "RefScenario.Team"
+          },
+          "Id": "1",
+          "Name": "Team 1",
+          "isScrumTeam": false,
+          "nt_Employees": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')/nt_Employees"
+            }
+          }
+        },
+        "ne_Room": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Room"
+          }
+        }
+      },
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')",
+          "type": "RefScenario.Employee",
+          "content_type": "image/jpeg",
+          "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')/$value",
+          "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')/$value"
+        },
+        "EmployeeId": "6",
+        "EmployeeName": "Susan Bay",
+        "ManagerId": "1",
+        "RoomId": "2",
+        "TeamId": "3",
+        "Location": {
+          "__metadata": {
+            "type": "RefScenario.c_Location"
+          },
+          "City": {
+            "__metadata": {
+              "type": "RefScenario.c_City"
+            },
+            "PostalCode": "69190",
+            "CityName": "Walldorf"
+          },
+          "Country": "Germany"
+        },
+        "Age": 29,
+        "EntryDate": "/Date(1291161600000)/",
+        "ImageUrl": "Employees('6')/$value",
+        "ne_Manager": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')/ne_Manager"
+          }
+        },
+        "ne_Team": {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('3')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('3')",
+            "type": "RefScenario.Team"
+          },
+          "Id": "3",
+          "Name": "Team 3",
+          "isScrumTeam": false,
+          "nt_Employees": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('3')/nt_Employees"
+            }
+          }
+        },
+        "ne_Room": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('6')/ne_Room"
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployeesTeams.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployeesTeams.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployeesTeams.json
new file mode 100644
index 0000000..b466ad2
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployeesTeams.json
@@ -0,0 +1,236 @@
+{
+  "d": {
+    "results": [
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"1\""
+        },
+        "Id": "1",
+        "Name": "Room 1",
+        "Seats": 1,
+        "Version": 1,
+        "nr_Employees": {
+          "results": [
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value"
+              },
+              "EmployeeId": "1",
+              "EmployeeName": "Walter Winter",
+              "ManagerId": "1",
+              "RoomId": "1",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69124",
+                  "CityName": "Heidelberg"
+                },
+                "Country": "Germany"
+              },
+              "Age": 52,
+              "EntryDate": "/Date(915148800000)/",
+              "ImageUrl": "Employees('1')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__metadata": {
+                  "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "type": "RefScenario.Team"
+                },
+                "Id": "1",
+                "Name": "Team 1",
+                "isScrumTeam": false,
+                "nt_Employees": {
+                  "__deferred": {
+                    "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                  }
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Room"
+                }
+              }
+            }
+          ]
+        },
+        "nr_Building": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')/nr_Building"
+          }
+        }
+      },
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('10')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('10')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"1\""
+        },
+        "Id": "10",
+        "Name": "Room 10",
+        "Seats": 6,
+        "Version": 1,
+        "nr_Employees": {
+          "results": []
+        },
+        "nr_Building": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('10')/nr_Building"
+          }
+        }
+      },
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('2')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('2')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"2\""
+        },
+        "Id": "2",
+        "Name": "Room 2",
+        "Seats": 5,
+        "Version": 2,
+        "nr_Employees": {
+          "results": [
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value"
+              },
+              "EmployeeId": "2",
+              "EmployeeName": "Frederic Fall",
+              "ManagerId": "1",
+              "RoomId": "2",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69190",
+                  "CityName": "Walldorf"
+                },
+                "Country": "Germany"
+              },
+              "Age": 32,
+              "EntryDate": "/Date(1057017600000)/",
+              "ImageUrl": "Employees('2')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__metadata": {
+                  "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "type": "RefScenario.Team"
+                },
+                "Id": "1",
+                "Name": "Team 1",
+                "isScrumTeam": false,
+                "nt_Employees": {
+                  "__deferred": {
+                    "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                  }
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Room"
+                }
+              }
+            },
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/$value"
+              },
+              "EmployeeId": "3",
+              "EmployeeName": "Jonathan Smith",
+              "ManagerId": "1",
+              "RoomId": "2",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69190",
+                  "CityName": "Walldorf"
+                },
+                "Country": "Germany"
+              },
+              "Age": 56,
+              "EntryDate": null,
+              "ImageUrl": "Employees('3')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__metadata": {
+                  "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')",
+                  "type": "RefScenario.Team"
+                },
+                "Id": "1",
+                "Name": "Team 1",
+                "isScrumTeam": false,
+                "nt_Employees": {
+                  "__deferred": {
+                    "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                  }
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/ne_Room"
+                }
+              }
+            }
+          ]
+        },
+        "nr_Building": {
+          "__deferred": {
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('2')/nr_Building"
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployees_InlineBuilding.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployees_InlineBuilding.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployees_InlineBuilding.json
new file mode 100644
index 0000000..3d1747f
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonRooms_InlineEmployees_InlineBuilding.json
@@ -0,0 +1,236 @@
+{
+  "d": {
+    "results": [
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('1')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"1\""
+        },
+        "Id": "1",
+        "Name": "Room 1",
+        "Seats": 1,
+        "Version": 1,
+        "nr_Employees": {
+          "results": [
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/$value"
+              },
+              "EmployeeId": "1",
+              "EmployeeName": "Walter Winter",
+              "ManagerId": "1",
+              "RoomId": "1",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69124",
+                  "CityName": "Heidelberg"
+                },
+                "Country": "Germany"
+              },
+              "Age": 52,
+              "EntryDate": "/Date(915148800000)/",
+              "ImageUrl": "Employees('1')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Team"
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('1')/ne_Room"
+                }
+              }
+            }
+          ]
+        },
+        "nr_Building": {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('1')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('1')",
+            "type": "RefScenario.Building"
+          },
+          "Id": "1",
+          "Name": "Building 1",
+          "Image": null,
+          "nb_Rooms": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('1')/nb_Rooms"
+            }
+          }
+        }
+      },
+      {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('10')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('10')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"1\""
+        },
+        "Id": "10",
+        "Name": "Room 10",
+        "Seats": 6,
+        "Version": 1,
+        "nr_Employees": {
+          "results": []
+        },
+        "nr_Building": {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('3')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('3')",
+            "type": "RefScenario.Building"
+          },
+          "Id": "3",
+          "Name": "Building 3",
+          "Image": null,
+          "nb_Rooms": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('3')/nb_Rooms"
+            }
+          }
+        }
+      },
+         {
+        "__metadata": {
+          "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('2')",
+          "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Rooms('2')",
+          "type": "RefScenario.Room",
+          "etag": "W/\"2\""
+        },
+        "Id": "2",
+        "Name": "Room 2",
+        "Seats": 5,
+        "Version": 2,
+        "nr_Employees": {
+          "results": [
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/$value"
+              },
+              "EmployeeId": "2",
+              "EmployeeName": "Frederic Fall",
+              "ManagerId": "1",
+              "RoomId": "2",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69190",
+                  "CityName": "Walldorf"
+                },
+                "Country": "Germany"
+              },
+              "Age": 32,
+              "EntryDate": "/Date(1057017600000)/",
+              "ImageUrl": "Employees('2')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Team"
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('2')/ne_Room"
+                }
+              }
+            },
+            {
+              "__metadata": {
+                "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')",
+                "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')",
+                "type": "RefScenario.Employee",
+                "content_type": "image/jpeg",
+                "media_src": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/$value",
+                "edit_media": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/$value"
+              },
+              "EmployeeId": "3",
+              "EmployeeName": "Jonathan Smith",
+              "ManagerId": "1",
+              "RoomId": "2",
+              "TeamId": "1",
+              "Location": {
+                "__metadata": {
+                  "type": "RefScenario.c_Location"
+                },
+                "City": {
+                  "__metadata": {
+                    "type": "RefScenario.c_City"
+                  },
+                  "PostalCode": "69190",
+                  "CityName": "Walldorf"
+                },
+                "Country": "Germany"
+              },
+              "Age": 56,
+              "EntryDate": null,
+              "ImageUrl": "Employees('3')/$value",
+              "ne_Manager": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/ne_Manager"
+                }
+              },
+              "ne_Team": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/ne_Team"
+                }
+              },
+              "ne_Room": {
+                "__deferred": {
+                  "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Employees('3')/ne_Room"
+                }
+              }
+            }
+          ]
+        },
+        "nr_Building": {
+          "__metadata": {
+            "id": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('2')",
+            "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('2')",
+            "type": "RefScenario.Building"
+          },
+          "Id": "2",
+          "Name": "Building 2",
+          "Image": null,
+          "nb_Rooms": {
+            "__deferred": {
+              "uri": 
"http://localhost:8080/olingo-odata2-ref-web/ReferenceScenario.svc/Buildings('2')/nb_Rooms"
+            }
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeam.json
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-client-core/src/test/resources/JsonTeam.json 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeam.json
new file mode 100644
index 0000000..50e1694
--- /dev/null
+++ b/odata2-lib/odata-client-core/src/test/resources/JsonTeam.json
@@ -0,0 +1,17 @@
+{
+       "d" : {
+               "__metadata" : {
+                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                       "type" : "RefScenario.Team"
+               },
+               "Id" : "1",
+               "Name" : "Team 1",
+               "isScrumTeam" : false,
+               "nt_Employees" : {
+                       "__deferred" : {
+                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                       }
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeams.json
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-client-core/src/test/resources/JsonTeams.json 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeams.json
new file mode 100644
index 0000000..4743c84
--- /dev/null
+++ b/odata2-lib/odata-client-core/src/test/resources/JsonTeams.json
@@ -0,0 +1,34 @@
+{
+       "d" : {
+               "results" : [{
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "1",
+                               "Name" : "Team 1",
+                               "isScrumTeam" : false,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                                       }
+                               }
+                       }, {
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "2",
+                               "Name" : "Team 2",
+                               "isScrumTeam" : true,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')/nt_Employees"
+                                       }
+                               }
+                       }
+               ]
+       }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCount.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCount.json 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCount.json
new file mode 100644
index 0000000..b76fff8
--- /dev/null
+++ b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCount.json
@@ -0,0 +1,35 @@
+{
+       "d" : {
+               "__count" : "3",
+               "results" : [{
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "2",
+                               "Name" : "Team 2",
+                               "isScrumTeam" : true,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')/nt_Employees"
+                                       }
+                               }
+                       }, {
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "3",
+                               "Name" : "Team 3",
+                               "isScrumTeam" : false,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')/nt_Employees"
+                                       }
+                               }
+                       }
+               ]
+       }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCountWithoutD.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCountWithoutD.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCountWithoutD.json
new file mode 100644
index 0000000..a0231e6
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithCountWithoutD.json
@@ -0,0 +1,34 @@
+{
+               "__count" : "3",
+               "results" : [{
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "2",
+                               "Name" : "Team 2",
+                               "isScrumTeam" : true,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')/nt_Employees"
+                                       }
+                               }
+                       }, {
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "3",
+                               "Name" : "Team 3",
+                               "isScrumTeam" : false,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('3')/nt_Employees"
+                                       }
+                               }
+                       }
+               ]
+       }
+

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithInlineEmployees.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithInlineEmployees.json
 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithInlineEmployees.json
new file mode 100644
index 0000000..568bbc9
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithInlineEmployees.json
@@ -0,0 +1,151 @@
+{
+       "d" : {
+               "__metadata" : {
+                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                       "type" : "RefScenario.Team"
+               },
+               "Id" : "1",
+               "Name" : "Team 1",
+               "isScrumTeam" : false,
+               "nt_Employees" : {
+                       "results" : [{
+                                       "__metadata" : {
+                                               "id" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')",
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')",
+                                               "type" : "RefScenario.Employee",
+                                               "content_type" : "image/jpeg",
+                                               "media_src" : 
"Employees('1')/$value",
+                                               "edit_media" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')/$value"
+                                       },
+                                       "EmployeeId" : "1",
+                                       "EmployeeName" : "Walter Winter",
+                                       "ManagerId" : "1",
+                                       "RoomId" : "1",
+                                       "TeamId" : "1",
+                                       "Location" : {
+                                               "__metadata" : {
+                                                       "type" : 
"RefScenario.c_Location"
+                                               },
+                                               "City" : {
+                                                       "__metadata" : {
+                                                               "type" : 
"RefScenario.c_City"
+                                                       },
+                                                       "PostalCode" : "69124",
+                                                       "CityName" : 
"Heidelberg"
+                                               },
+                                               "Country" : "Germany"
+                                       },
+                                       "Age" : 52,
+                                       "EntryDate" : "\/Date(915148800000)\/",
+                                       "ImageUrl" : "Employees('1')/$value",
+                                       "ne_Manager" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')/ne_Manager"
+                                               }
+                                       },
+                                       "ne_Team" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')/ne_Team"
+                                               }
+                                       },
+                                       "ne_Room" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('1')/ne_Room"
+                                               }
+                                       }
+                               }, {
+                                       "__metadata" : {
+                                               "id" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')",
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')",
+                                               "type" : "RefScenario.Employee",
+                                               "content_type" : "image/jpeg",
+                                               "media_src" : 
"Employees('2')/$value",
+                                               "edit_media" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')/$value"
+                                       },
+                                       "EmployeeId" : "2",
+                                       "EmployeeName" : "Frederic Fall",
+                                       "ManagerId" : "1",
+                                       "RoomId" : "2",
+                                       "TeamId" : "1",
+                                       "Location" : {
+                                               "__metadata" : {
+                                                       "type" : 
"RefScenario.c_Location"
+                                               },
+                                               "City" : {
+                                                       "__metadata" : {
+                                                               "type" : 
"RefScenario.c_City"
+                                                       },
+                                                       "PostalCode" : "69190",
+                                                       "CityName" : "Walldorf"
+                                               },
+                                               "Country" : "Germany"
+                                       },
+                                       "Age" : 32,
+                                       "EntryDate" : "\/Date(1057017600000)\/",
+                                       "ImageUrl" : "Employees('2')/$value",
+                                       "ne_Manager" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')/ne_Manager"
+                                               }
+                                       },
+                                       "ne_Team" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')/ne_Team"
+                                               }
+                                       },
+                                       "ne_Room" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('2')/ne_Room"
+                                               }
+                                       }
+                               }, {
+                                       "__metadata" : {
+                                               "id" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')",
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')",
+                                               "type" : "RefScenario.Employee",
+                                               "content_type" : "image/jpeg",
+                                               "media_src" : 
"Employees('3')/$value",
+                                               "edit_media" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')/$value"
+                                       },
+                                       "EmployeeId" : "3",
+                                       "EmployeeName" : "Jonathan Smith",
+                                       "ManagerId" : "1",
+                                       "RoomId" : "2",
+                                       "TeamId" : "1",
+                                       "Location" : {
+                                               "__metadata" : {
+                                                       "type" : 
"RefScenario.c_Location"
+                                               },
+                                               "City" : {
+                                                       "__metadata" : {
+                                                               "type" : 
"RefScenario.c_City"
+                                                       },
+                                                       "PostalCode" : "69190",
+                                                       "CityName" : "Walldorf"
+                                               },
+                                               "Country" : "Germany"
+                                       },
+                                       "Age" : 56,
+                                       "EntryDate" : null,
+                                       "ImageUrl" : "Employees('3')/$value",
+                                       "ne_Manager" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')/ne_Manager"
+                                               }
+                                       },
+                                       "ne_Team" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')/ne_Team"
+                                               }
+                                       },
+                                       "ne_Room" : {
+                                               "__deferred" : {
+                                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Employees('3')/ne_Room"
+                                               }
+                                       }
+                               }
+                       ]
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithoutD.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithoutD.json 
b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithoutD.json
new file mode 100644
index 0000000..5848584
--- /dev/null
+++ b/odata2-lib/odata-client-core/src/test/resources/JsonTeamsWithoutD.json
@@ -0,0 +1,33 @@
+{
+               "results" : [{
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "1",
+                               "Name" : "Team 1",
+                               "isScrumTeam" : false,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('1')/nt_Employees"
+                                       }
+                               }
+                       }, {
+                               "__metadata" : {
+                                       "id" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')",
+                                       "type" : "RefScenario.Team"
+                               },
+                               "Id" : "2",
+                               "Name" : "Team 2",
+                               "isScrumTeam" : true,
+                               "nt_Employees" : {
+                                       "__deferred" : {
+                                               "uri" : 
"http://localhost:8080/ReferenceScenario.svc/Teams('2')/nt_Employees"
+                                       }
+                               }
+                       }
+               ]
+}
+

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/4261deb7/odata2-lib/odata-client-core/src/test/resources/JsonWithDeletedEntries.json
----------------------------------------------------------------------
diff --git 
a/odata2-lib/odata-client-core/src/test/resources/JsonWithDeletedEntries.json 
b/odata2-lib/odata-client-core/src/test/resources/JsonWithDeletedEntries.json
new file mode 100644
index 0000000..00eabe3
--- /dev/null
+++ 
b/odata2-lib/odata-client-core/src/test/resources/JsonWithDeletedEntries.json
@@ -0,0 +1,30 @@
+{
+"d": {
+"results": [
+  {
+    "__metadata": 
+        { 
+            "id": "http://ldcigmd.wdf.sap.corp:50055/sap/bc/odata/Rooms('1')", 
+            "uri": 
"http://ldcigmd.wdf.sap.corp:50055/sap/bc/odata/Rooms('1')", 
+            "type": "RefScenario.Room", 
+           "etag":"W/\"2\""
+        },
+    "Id": "1",
+    "Name": "Room 1",
+    "Seats": 1,
+    "Version": 1
+  },
+     {
+        "@odata.context":"$metadata#Rooms/$deletedEntity",
+        "id":"http://host:80/service/Rooms('3')",
+        "when":"\/Date(1300561560000)\/"
+     },
+     {
+        "@odata.context":"$metadata#Rooms/$deletedEntity",
+        "id":"http://host:80/service/Rooms('4')",
+        "when":"\/Date(3509636760000)\/"
+     }
+],
+"__delta":"http://localhost:8080/ReferenceScenario.svc/Rooms?!deltatoken=4711";
+}
+}
\ No newline at end of file

Reply via email to