Reputation: 574
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?
Upvotes: 0
Views: 218
Reputation: 28341
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.
Upvotes: 1