Skip to content

RepositoryResourceMapping Should Work With Repositories Instead Of PersistentEntities #2276

Open
@ptahchiev

Description

@ptahchiev

Hello,

up until version 3.3.9 the RepositoryResourceMappings class was using the Repositories object to populate the cache needed for the ResourceMetadataHandlerMethodArgumentResolver as you can see here:

https://github.com/spring-projects/spring-data-rest/blob/3.3.9.RELEASE/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryResourceMappings.java#L69

Then this method was changed to use the PersistentEntities as youc an see here:

https://github.com/spring-projects/spring-data-rest/blob/main/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryResourceMappings.java#L69

The PersistentEntities object is constructed by trying to locate all the javax.persistence.metamodel.Metamodel and thus completely ignores the alternativeDomainTypes a RepositoryMetadata may hold.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions