Open
Description
Vladislav Ogol opened DATAMONGO-2525 and commented
I as a developer want to have an ability to manage collection names without specifying
@Document
annotations, so that it will let me persist objects which are out of my control or which should not be coupled with persistent layer implementation in a custom named collections.
I think that the easiest way to do that is to let me provide own implementation of the MongoCollectionUtils
class (probably with some more suitable class name) with the static method getPreferredCollectionName
replaced with something like this:
public Supplier<String> getPreferredCollectionName(Class<?> entityClass) {
return () -> StringUtils.uncapitalize(entityClass.getSimpleName());
}
So that the Supplier
can be cached in MongoPersistentEntity
for future use
Affects: 2.2.6 (Moore SR6)
1 votes, 2 watchers