Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb Spring数据-Mongo DB-@TextIndexed over@DBRef_Mongodb_Spring Data_Dbref - Fatal编程技术网

Mongodb Spring数据-Mongo DB-@TextIndexed over@DBRef

Mongodb Spring数据-Mongo DB-@TextIndexed over@DBRef,mongodb,spring-data,dbref,Mongodb,Spring Data,Dbref,是否可以通过@DBRef在字符串字段中搜索。 我有这个文件: public class DocumentFileVersion { @TextIndexed @DBRef private OtherObject otherObject 我将在otherObject的字符串字段中搜索。有没有可能做到这一点?DBRef设计为只通过id参考查询 所以这是不可能的。您应该重新考虑您的模式结构

是否可以通过@DBRef在字符串字段中搜索。 我有这个文件:

public class DocumentFileVersion {

    @TextIndexed
    @DBRef
    private OtherObject otherObject

我将在otherObject的字符串字段中搜索。有没有可能做到这一点?

DBRef设计为只通过
id
参考查询

所以这是不可能的。您应该重新考虑您的模式结构