Comments (3)
Gunnar Sigurdsson commented
Reading through MongoTemplate is seems like this is not just an issue with saveDBObject(). Looks like insertDBObjectList() is making incorrect assumptions about ObjectId.
This is a blocker issue for us in terms of adopting this project. I strongly recommend that a fix for this issue be included in 1.0.0.
This is discussed here: http://forum.springsource.org/showthread.php?t=104461. From this thread:
Thanks for the replies. I have spent some time looking at the code, especially MongoTemplate and see the way ObjectId is assumed in several places. However, it seems like a bad implementation decision and an easy thing to fix.
We are heavily invested in spring and have been using mongo for a while and were hoping to adopt the spring mongo integration asap. This looks like the only blocker.
We are using Jackson to serialize/deserialize java objects to/from JSON and the mongo java driver to go between JSON and DBObject. It is trivial to hook our Jackson infrastructure into MongoTemplate by implementing the MongoReaderWriter interface. We have already tried this out. This would allow us to keep using Jackson while the spring mongo project comes up with a useable serialization/deserialization mechanism.
from spring-data-mongodb.
Oliver Drotbohm commented
That should be fixed in the meantime already. Could you please try a SNAPSHOT to see if it works for you?
from spring-data-mongodb.
Thomas Risberg commented
There was still a cast in the save method. I removed that
from spring-data-mongodb.
Related Issues (20)
- Upgrade to Maven Wrapper 3.9.6
- Upgrade to Maven Wrapper 3.9.6
- Question: Why not add a callback to retrieve such methods? HOT 3
- Release 4.1.8 (2023.0.8)
- Release 4.2.2 (2023.1.2)
- Add option to disable automatic mapping of java "id" field to Mongo "_id" field? HOT 2
- [FEATURE REQUEST] Support auto-incrementing numeric ID for a document HOT 1
- BsonUtils.hasValue(Bson bson, FieldName fieldName) does not deliver expected result HOT 1
- Nested field with @TypeAlias works when first operation is write and fails when read HOT 5
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Error creating bean with name 'mongoTemplate' defined in class path resource HOT 5
- Repository query keyword IS_EMPTY not supported HOT 1
- @Version Limits Long HOT 3
- Nested Interface-based projection fails with `ConverterNotFoundException` HOT 3
- Release 4.1.9 (2023.0.9)
- Release 4.2.3 (2023.1.3)
- Shard key not honored in ReferenceLookupDelegate when DocumentReference resolves to a empty collection HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-mongodb.