[JAVA-16] removeField not working as expected Created: 06/Aug/09  Updated: 02/Oct/09  Resolved: 07/Aug/09

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Major - P3
Reporter: Ryan Nitz Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you call removeField(name) from a BaseDBObject and then call toString(), the fields are still there and only the value is null. I would expect that it would remove all filed and the value.

E.g.

if (site.containsKey(SiteDocField.HOMEPAGE_CRAWL_CONTENT.key))

{ site.removeField(SiteDocField.HOMEPAGE_CRAWL_CONTENT.key); }

The JSON below still contains homec/HOMEPAGE_CRAWL_CONTENT.key

{"site":

{"blc":1104883,"tldid":1,"homefu":"http://www.bloomberg.com/","homec":null,"h":"www.bloomberg.com","homert":2072,"_ns":"sites","lhomet":1249578595914,"idxc":1104883,"_id":null,"hsyndf":false,"ta":1249578575882,"lfext":1249578615980,"lidxt":1249578595914,"hcopy":false,"lgpr":1249578595914,"lblct":1249578595914,"homerc":200}

,"siteId":"8c779c4797f10c5a1287c0e89cec4ae7"}



 Comments   
Comment by Ryan Nitz [ 06/Aug/09 ]

That is supposed to say:

"remove both the field and the value"

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