I'll try to make it short:
I have a class who's one of it's properties is a JValue. No matter what I put into this JValue (even a JString) - salat serializes it as a BasicDBList (which is weird imo in the first place..)
So saving an object to the database works fine, but when I try to findOne(), It seems like salat is unable to deserialize the object properly, as I'm getting:
argument type mismatch
$anon$2(class com.example.data.Telemetry @ com.novus.salat.global.package$$anon$1@7376d6c3) toObject failed on:
SYM: com.example.data.Telemetry
CONSTRUCTOR
public com.example.data.Telemetry(java.lang.String,org.json4s.JsonAST$JValue)
---------- CONSTRUCTOR EXPECTS FOR PARAM [1] --------------
NAME: location
TYPE: org.json4s.JsonAST$JValue
DEFAULT ARG [Missing, but unnecessary because input value was supplied]
@Ignore false
---------- CONSTRUCTOR INPUT ------------------------
TYPE: com.mongodb.BasicDBList
VALUE:
[ [ [ "latitude" , [ 34.001]] , [ "longitude" , [ 32.511]]]]
If it knows how to serialize a JValue (and turn it into a BasicDBList for it's own reasons I presume), why does the way back does not deserialize properly?
Am I missing something?