-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
Hi,
We implemented some custom functionality by extending JpaRepository, JpaRepositoryFactory, JpaRepositoryFactoryBean and SimpleJpaRepository. It was pretty straight forward once we figured out how to use those 4 classes.
Now we are looking at doing the same for SimpleMongoRepository. However, some crucial properties, methods and classes are package private making it impossible to extend those 4 Mongo variety classes without the use of reflection.
The core problem is really extending MongoRepositoryFactory. For the most basic functionality, we need access to:
- MongoOperations -- easy
- private <T, ID> MongoEntityInformation<T, ID> getEntityInformation(Class domainClass,
@nullable RepositoryMetadata metadata) -- requires reflection to call - SimpleMongoRepository::setRepositoryMethodMetadata(CrudMethodMetadata crudMethodMetadata) -- requires reflection to call
- no way to access crudMethodMetadata field without reflection
- CrudMethodMetadataPostProcessor also have to use reflection, generic Object here
- IndexEnsuringQueryCreationListener class is private, had to c&p it into our code
Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply