Cursor changeCursor = r.table(Hardcoded.rethinkDBTableName()).changes().getField("new_val").without("id").run(conn);
for (Object change : changeCursor) {
System.out.println(change);
}
结果:
{
askPrice=1.29846,
symbol=EUR/USD,
bidTime=1455800529000,
askTime=1455800529000,
bidSize=1,
askSize=1,
bidPrice=1.2984
}
预期:
{
"askSize":1,
"askPrice":1.2978,
"askTime":1455729430000,
"bidTime":1455729430000,
"bidPrice":1.29778,
"symbol":"EUR/USD",
"bidSize":1
}
答案 0 :(得分:1)
你可以写r.table(Hardcoded.rethinkDBTableName()).changes().getField("new_val").without("id").map(val -> val.toJson())
,我认为这会做你想要的。