-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
in: mappingMapping and conversion infrastructureMapping and conversion infrastructuretype: enhancementA general enhancementA general enhancement
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
Metadata
Metadata
Assignees
Labels
in: mappingMapping and conversion infrastructureMapping and conversion infrastructuretype: enhancementA general enhancementA general enhancement