【java – 用spring数据更新对象mongodb和kotlin不能正常工作】教程文章相关的互联网学习教程文章

java – 用spring数据更新对象mongodb和kotlin不能正常工作【代码】

我有以下请求处理程序fun x(req: ServerRequest) = req.toMono().flatMap {...val oldest = myRepository.findOldest(...) // this is the object I want to modify...val v= anotherMongoReactiveRepository.save(Y(...)) // this saves successfullymyRepository.save(oldest.copy(remaining = (oldest.remaining - 1))) // this is not savedok().body(...)}和以下mongodb反应库@Repository interface MyRepository : ReactiveM...