手册参考支持 [英] Manual references support

查看:51
本文介绍了手册参考支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑班级:

class Person {
    String name;
    Person father;
    Person mother;
    List<Person> children;
}

有没有办法向 jongo 表明 fathermotherchildren 应该是 手动引用到同一集合中的其他对象而不是嵌入对象?

Is there a way to indicate to jongo that father, mother and children should be manual references to other objects within the same collection instead of embedded objects?

注意:这与 DBRefs 不同.

推荐答案

还没有.

最简单的方法是手动发出第二个查询.

The easiest way is to issue a second query manually.

尽管如此,您还是可以创建一个 Jackson de/serializer 来在解组过程中获取文档.几个月前,我们在解组期间创建了一个用于获取 DBRef 的峰值,此代码可以帮助:在期间处理 DBRef(取消)编组

Nevertheless, you can propably create a Jackson de/serializer to fetch documents during unmarshalling process. Few months ago, we have created a spike for fetching DBRef during unmarhsalling, this code can help : Handle DBRef during (un)marshalling

随意添加功能请求

这篇关于手册参考支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆