Skip to content

Support dynamic naming strategy for collection names [DATAMONGO-1863] #2764

Closed
@spring-projects-issues

Description

@spring-projects-issues

Dan Markhasin opened DATAMONGO-1863 and commented

As described in DATAMONGO-525 (https://jira.spring.io/browse/DATAMONGO-525), we are looking for a way to generate collection names dynamically to support multi-tenancy.
This can be achieved by something as simple as a prefix or by a naming strategy mechanism, simliar to FieldNamingStrategy.

For example, the most simple solution that would work (for us) is to have something like this:

@Document(prefix = "${info.service_name}")
class Dog
{
private String breed;
}

That would generate a collection called animalService_Dog (assuming the service name is animalService).
Any other solution is welcome, but I believe this is a major feature that is currently lacking which is critical for multi-tenancy support


Reference URL: https://jira.spring.io/browse/DATAMONGO-525

1 votes, 3 watchers

Metadata

Metadata

Assignees

Labels

in: mappingMapping and conversion infrastructurestatus: blockedAn issue that's blocked on an external project changetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions