[SERVER-20309] Mongo data structure similar to Java's Map Created: 07/Sep/15 Updated: 09/Oct/15 Resolved: 09/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Hendra | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
I wish to know if it's possible to request for a feature in mongoDB for a data structure that behaves like Java Map. So, currently, when I save HashMap, mongo will convert this to objects, not arrays. This makes "merge" operation like Java Hashmap's putAll() method really hard. |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 15/Sep/15 ] | |||||
|
Hi Hendra, The SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag where your questions will reach a larger audience. I noticed this question has already been posted on the mongodb-user group , so someone will follow up there. Thanks, | |||||
| Comment by Hendra [ 07/Sep/15 ] | |||||
|
Hi all, I'm storing exchange rate where the POJO looks like
the problem here is the "rate" field. I prefer if there's a function in mongo that would do like:
which would have upsert behavior. Is this doable with the latest mongoDB version? What are my options? Thanks |