What is the result type of the Promise returned by get()? The spec is not clear about this. It is likely a value (of 'any' type) if only 1 id is given and an array of values (any[]) if several ids are requested.
One issue is also, what is supposed to happen if several ids are requested but some of them do not exist in the database? 2 solutions are possible:
The whole thing fails and the Promise returns an error
We fallback nicely and return the objects whose ids actually exist. But then, it is not obvious to the user which ids actually succeeded.
What is the result type of the Promise returned by get()? The spec is not clear about this. It is likely a value (of 'any' type) if only 1 id is given and an array of values (any[]) if several ids are requested.
One issue is also, what is supposed to happen if several ids are requested but some of them do not exist in the database? 2 solutions are possible: