DATACOUCH-161 - Improve multitemplate mapping configuration
The configuration step made it look like a new mapping was necessary in overrides, whereas it is actually possible and clearer to mutate the base mapping. Added a convenience method to get the MappingContext from the repository mapping.
This commit is contained in:
@@ -106,8 +106,8 @@ public class RepositoryTemplateWiringTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public RepositoryOperationsMapping repositoryOperationsMapping() throws Exception {
|
||||
return new RepositoryOperationsMapping(templateC())
|
||||
public void configureRepositoryOperationsMapping(RepositoryOperationsMapping base) {
|
||||
base.setDefault(templateC())
|
||||
.map(BucketBRepository.class, templateB())
|
||||
.mapEntity(Item.class, templateA());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user