Spring Data REST vs OData
I have a few questions about the concept of Spring Data REST as an Enterprise-capable data access tool.
Spring Data REST looks to effectively expose Spring Data repositories. But, it looks like OData and OData4j have gone farther so far with their exposure of JPA and InMemory Producers accessible via ODATA URI constructions sent as REST URL parameters.
Complicating the above are articles about the sanctity of REST and whether it is properly used for CRUD-style access to data. And in Daigneau's "Service Design Patterns" we learn about the problem of exposing database implementation details to the client.
Here are some questions:
1. What will be similar and what different between the vision for Spring Data REST and the present OData?
2. Ignoring security concerns for the purpose of this question, under which conditions is it desirable to allow generic access to a data repository where arbitrary selection/projection queries can be formulated from a client? When is it not a good idea for the client to make this formulation?
3. For cases where generic access is desirable, should clients ultimately have full JPQL-style query powers? If so, how can exposure of database implementation details be avoided?
4. For data that is complex and needs to be enriched and complexly structured, Moxy, for instance, could be used to create the necessary mapping on the server side. How might Spring Data REST be addressing or complementing this problem space, if at all?
5. OData addresses authorization and authentication. How might Spring Data REST be addressing these?
Thank you.