Description
Tim Meißner opened DATAREST-923 and commented
My case is that i have an Entity "User" and two Repositories:
- UserRepository extends CrudRepository,
@RepositoryRestResource
(exported = false): meant for internal usage by services etc. - UserRestRepository extends Repository,
@RepositoryRestResource
(exported = true): meant for external usage, restricted access, etc.
This exports a user resource in 50% of the times i start up the application. I tried to work around this by annotating them with @Order
(0/1) for the UserRepository and @Order
(1/0) for the UserRestRepository, but it doesn't work.
So I would like to have the possibility to have multiple Repositories for one entity (only one exported but it should not conflict with other normal Repositories that are not exported).
Affects: 2.5.4 (Hopper SR4)
Reference URL: http://stackoverflow.com/questions/36112451/multiple-repositories-for-the-same-entity-in-spring-data-rest
Issue Links:
- DATACMNS-1448 Repositories should select primary repository in case multiple are available for a domain type
("depends on")
Referenced from: pull request spring-projects/spring-data-commons#465, and commits spring-projects/spring-data-commons@de7a7ca, spring-projects/spring-data-commons@d8705c1
40 votes, 40 watchers