我有一个在我的平台上创建文档(订单)的外部系统。 我的平台的引用是通过字符串代码维护的,字符串代码不是主键。 所以,我有以下实体:
{ docType: "submission", code: "XPTO28", name: "test-sub" } { docType: "order", code: "XPTO28", value: "100$" }是否有任何查询将订单文档与提交文档关联而不使用主键,或者我必须以编程方式执行此操作吗?
I have an external system that creates documents (orders) on my platform. The reference to my platform is maintained through a string code, which is not a primary key. So, I have the following entities:
{ docType: "submission", code: "XPTO28", name: "test-sub" } { docType: "order", code: "XPTO28", value: "100$" }Is there any query to associate order documents to submission documents without using primary keys, or must I do so programatically?
最满意答案
你必须以编程方式进行。 N1QL中的联接目前仅限于将字段(或可以从字段重建的内容,例如,连接前缀)链接到连接的密钥空间的主键。
You have to do it programatically. Joins in N1QL are currently limited to linking a field (or something that can be reconstructed from a field, eg. concatenating a prefix) to the primary key of the joined keyspace.
更多推荐
发布评论