[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 )

Generated at Thu Feb 08 08:51:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.