[JAVA-7] Could JSON#serialize support DBRef? Created: 06/Jul/09 Updated: 13/Jul/09 Resolved: 06/Jul/09 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | tomoharu fujita | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
com.mongodb.BasicDBObject#toString throws RuntimeException if that contains DBRef. |
| Comments |
| Comment by Kristina Chodorow (Inactive) [ 06/Jul/09 ] |
|
Since BasicDBObject.toString() is supposed to return JSON, I made DBRef serialize to: { "$ref" : ns, "$id" : ObjectId("...") } |
| Comment by Eliot Horowitz (Inactive) [ 06/Jul/09 ] |
|
Probably should serialze to new DBRef( _id , ns ) |