Open joostdevries opened 11 years ago
I think there are two features here:
findMany
I think both could be valuable. But should probably be treated separately.
Just a small note/opinion on this. Any implementation of findMany
should probably take a parent argument (group in this case). This would give the same benefit even if the api isn't completely flat. E.g. the request would then be: GET /group/1/users
Can't find this in the roadmap but it's a pretty nice feature to have as it can severly reduce workload on the server in cases of hasMany relations with lots of FK's.
This idea is pretty simple, if
session.find('group',1)
would return this JSON..... and my
App.Group
would have a relationusers:Ep.hasMany(App.User)
, the adapter would make the following request:GET /users?ids[]=1&ids[]=2&ids[]=3
If this is something within scope I can probably create a PR with code as well.