Add `getIdsToFetch` to RelationalModel. Ref #463