-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
in: repositoryRepositories abstractionRepositories abstractiontype: enhancementA general enhancementA general enhancement
Milestone
Description
Oliver Drotbohm opened DATAMONGO-131 and commented
With the fix for issue DATAMONGO-128 we allow persisting inheritance structures with repositories. Unfortunately executing findOne(…)
uses MongoEntityInformation
to lookup the id property to pipe it into the query. This id property is discovered from the domain class the repository manages. This implies that this type carries the id property which doesn't have to be the case (it actually can't be the case for interfaces as managed root type).
So we should use the MongoTemplate
's MappingContext
instead to ask it for the entity meta information of the given object instead of the type managed by the repo
Affects: 1.0 M2
9 votes, 9 watchers
Metadata
Metadata
Assignees
Labels
in: repositoryRepositories abstractionRepositories abstractiontype: enhancementA general enhancementA general enhancement