skip to content

OData

A REST-based protocol with a typed entity model, a $metadata document, and query options like $filter, $select and $expand. Interviewers ask in Microsoft or SAP stacks and when GraphQL is the rival.

part ofAPI stylesoverview, primer and where to startread it →
on this pageshow

explore

questions

page 2 of 2

In an OData model, when would you extend an entity type with a derived type rather than declare it OpenType, and what does each cost a client?

level: seniorimportance: nice to knowfreq 6%

basics

~20 s

Use a derived entity type (BaseType) when a variant has a known, stable shape: it inherits the key and is reachable by type cast. Use OpenType when instances carry undeclared per-instance properties, which clients learn only from payloads.

open as a page

In OData, when would a client use $apply with groupby and aggregate instead of 4.01's $compute, and how does each change the response?

level: seniorimportance: nice to knowfreq 7%

basics

~20 s

$apply transforms the collection itself: groupby and aggregate return one row per group with aliased totals. $compute, new in OData 4.01, adds a calculated property to each existing row without changing how many rows come back.

open as a page

When an OData 4.0 service is upgraded to OData 4.01, which existing 4.0 clients could break, and what keeps them working?

level: seniorimportance: nice to knowfreq 5%

basics

~20 s

The 4.0 clients at risk are those that send no OData-MaxVersion, since a 4.01 service may answer them with 4.01 payloads. Clients stay safe by sending OData-MaxVersion: 4.0, which obliges the service to answer in 4.0.

open as a page

showing 31–33 of 33