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

MappingMongoConverter.write(…) does not consider Document a native type and adds _class attribute [DATAMONGO-2043] #2910

Closed
spring-projects-issues opened this issue Aug 6, 2018 · 1 comment

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Aug 6, 2018

Christoph Strobl opened DATAMONGO-2043 and commented

template.insert(new org.bson.Document("_id", UUID.randomUUID().toString()), "foobar");

results in the following, having a _class attribute which should not be present.

{
    "_id" : "f042173d-81bc-453b-b690-ff5ac45cdcbe",
    "_class" : "org.bson.Document"
}

Affects: 2.1 RC1 (Lovelace), 1.10.14 (Ingalls SR14), 2.0.9 (Kay SR9)

Issue Links:

  • DATAMONGO-2028 EntityOperations does not apply conversion to Mongo types

Referenced from: pull request #589

Backported to: 2.0.10 (Kay SR10), 1.10.15 (Ingalls SR15)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Aug 7, 2018

Mark Paluch commented

MappingMongoConverter.write(Object, [DbObject|Bson]) suffers also in 1.10.x and 2.0.x from the issue. MongoTemplate.insert(Collection, String) is affected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants