[JAVA-260] Support dot notation in DBObject.get and DBObject.put Created: 19/Jan/11 Updated: 08/Jun/17 Resolved: 28/Jul/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Martin Grotzke | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 10 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
While dot notation can be used in queries to look up objects, this is not supported in DBObject.get. Also DBObject.put should handle dots in specified keys accordingly. I've written simple static methods that implement the desired behaviour, with related tests. Tests first:
Implementation of get/put:
Could this behaviour be introduced to DBObject implementations or there any reason why this does not make sense? |
| Comments |
| Comment by Jeffrey Yemin [ 28/Jul/16 ] |
|
Closing as Won't Fix because:
|
| Comment by Maniappan R [ 17/Feb/12 ] |
|
I too feel that this can get into DBObject and keep BasicDBObject for basic types. |
| Comment by Martin Grotzke [ 09/Feb/11 ] |
|
Ok, I understand that map semantics shall not be broken. Why should it not go into DBObject but "only" BasicDBObject? |
| Comment by Eliot Horowitz (Inactive) [ 08/Feb/11 ] |
|
This goes against keeping it like a Map and makes it a bit weird... |