Skip to content
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

Upgrade to 2.7.4 broke mongoDB uuid lookup with spring data #32743

Closed
pcornelissen opened this issue Oct 15, 2022 · 1 comment
Closed

Upgrade to 2.7.4 broke mongoDB uuid lookup with spring data #32743

pcornelissen opened this issue Oct 15, 2022 · 1 comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue

Comments

@pcornelissen
Copy link

I have noticed that after the upgrade from spring boot 2.7.3 to 2.7.4 my application stopped "working" and almost all tests were broken.

Upon investigation I noticed that the ID lookup seems to be broken and returns no result.
I have created a minimal repo that showcases the problem:

https://github.com/pcornelissen/springboot-mongo-bug

The current version is broken, when you just change the version to 2.7.3 and do a clean package run, it will succeed.

The test does just:

        MyEntity org = MyEntity.builder().id(UUID.randomUUID()).data("foo").build();
        MyEntity saved = repo.save(org);
        assertThat(org.getId()).isEqualTo(saved.getId());
        assertThat(repo.findById(org.getId()))
                .isNotEmpty();

I have noticed that the UUID format has changed as well:

{"_id":{"$binary":{"base64":"debN0/uRTmargUJaqJSJ6Q==","subType":"04"}},"version":1,"data":"foo 2022-10-15T13:45:49.082724","_class":"com.mongo.bug.broken.MyEntity"}
{"_id":{"$oid":"634a9da17e1c5c7747488592"},"version":1,"data":"foo 2022-10-15T13:46:41.718246","_class":"com.mongo.bug.broken.MyEntity"}

The first line is produced by 2.7.3, the second with 2.7.4

I am using the standard UUID representation in the config. (I just tried the java legacy setting, but the results were identical in terms of success and format to the standard setting)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 15, 2022
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 15, 2022
@wilkinsona
Copy link
Member

Please take a moment to search exists issues before opening a new one. Duplicates #32741, #32635, and spring-projects/spring-data-mongodb#4184.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants