3
我有以下情況下的類:salat是否支持de /序列化類型在scala中?
case class DataEntity
(
name: String,
value: Either[Complex, String]
)
case class Complex (x: String, y: String)
據我所看到的,序列化(寫入的MongoDB)變細,但在反串行化失敗:
com.novus.salat.util.ToObjectGlitch:
argument type mismatch
$anon$2(class catalog.DataEntity @ [email protected]) toObject failed on:
SYM: catalog.DataEntity
CONSTRUCTOR
public catalog.DataEntity(java.lang.String,scala.util.Either<catalog.Complex, java.lang.String>)
---------- CONSTRUCTOR EXPECTS FOR PARAM [0] --------------
NAME: name
TYPE: java.lang.String
DEFAULT ARG [Missing, but unnecessary because input value was supplied]
@Ignore false
---------- CONSTRUCTOR INPUT ------------------------
TYPE: java.lang.String
VALUE:
TESTTEXT
------------------------------------------------------------
---------- CONSTRUCTOR EXPECTS FOR PARAM [1] --------------
NAME: value
TYPE: scala.util.Either<catalog.Complex, java.lang.String>
DEFAULT ARG [Missing, but unnecessary because input value was supplied]
@Ignore false
---------- CONSTRUCTOR INPUT ------------------------
TYPE: com.mongodb.BasicDBList
VALUE:
[ [ "File" , "/bin/ls" ...
------------------------------------------------------------
上面的輸出是手動與上面的簡化案例類匹配。 我正在使用salatDAO讀取和寫入數據庫。