Skip to content

After migrating to spring boot 3.0.2 getting - Couldn't find PersistentEntity for type class org.bson.Document #4300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
serleonsolo2 opened this issue Feb 21, 2023 · 1 comment
Assignees
Labels
type: regression A regression from a previous release

Comments

@serleonsolo2
Copy link

serleonsolo2 commented Feb 21, 2023

After upgrading to
spring boot 3.0.2
spring-data-mongodb-4.0.1
spring-data-commons-3.0.1

All calls like below are failing with Couldn't find PersistentEntity for type class org.bson.Document:

reactiveMongoTemplate.findAndReplace(
                    query,
                    replacement,
                    options,
                    Document::class.java,
                    MasterData.COLLECTION_NAME,
                    MasterData::class.java
                )

replacement has no id field, type is org.bson.Document

PS The same code works without any issues on versions:
spring-data-mongodb-3.2.10
spring-data-commons-2.5.10

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 21, 2023
@christophstrobl
Copy link
Member

@serleonsolo2 thanks for reporting!

@christophstrobl christophstrobl self-assigned this Feb 22, 2023
@christophstrobl christophstrobl added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 22, 2023
christophstrobl added a commit that referenced this issue Mar 2, 2023
…omain value.

This commit fixes a regression that prevented native org.bson.Document to serve as source for a findAndReplaceOperation.

Closes: #4300
Original Pull Request: #4310
@christophstrobl christophstrobl added this to the 4.0.3 (2022.0.3) milestone Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
3 participants