added _beforeModelFetch hook
fixed context determination in rest handler when id is empty