JObjectField doesn't serialize to BSON #1346

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
@eltimn
Member

eltimn commented Nov 30, 2012

JObjectField isn't fully working following issue 1314 being fixed. In the current builds, JObjectField will serialize to something like "JObject(List(JField(minutes,Jint(59))))", rather than the intended BSON data structure.

The issue is that -fieldDbValue in BsonRecord falls through to the o.toString option when it asDBObject tried to create the DBObject.

I was able to shim in something that uses the mongo driver's JSON parser to deserialize a serialized JObject into a DBObject in the case that fieldDbValue gets a JObject, but it feels kinda hacky.

The current "get set from JValue" test only covers the fact that the JObject can in-fact be set on a given record, but it doesn't cover a round trip to BSON and back.

@eltimn

This comment has been minimized.

Show comment Hide comment
@eltimn

eltimn Nov 3, 2012

Member

Next time, please discuss this in the list before opening a ticket. That's standard Lift policy.

I will get this fixed soon.

Member

eltimn commented Nov 3, 2012

Next time, please discuss this in the list before opening a ticket. That's standard Lift policy.

I will get this fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment