Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Hi there,
I am trying to query data from javascript like below:
var query = NLWS.xtkQueryDef.create(
{queryDef: {schema: "nms:recipient", operation: "select",
select: {
node: [{expr: "@id"},
{expr: "@label"},
{expr: "@internalName"}]
},
where: {
condition: [{expr: "@id='16'"}]
}
}})
So for the above query, if I have another table which is nms:userEmail. And I want to inner join this table with the current one(which is the one that shows above in the js code(nms:recipient)), and get the joined table. How can I do that here? What the query should be like?
Thank you!
Solucionado! Ir para a Solução.
Visualizações
respostas
Total de curtidas
Hi,
Is the join defined in the schema already? In that case you should be able to reference attributes of the linked schema in the query, either in selected nodes or conditions:
var query = NLWS.xtkQueryDef.create( {queryDef: {schema: "nms:recipient", operation: "select", select: { node: [{expr: "@id"}, {expr: "@label"}, {expr: "@internalName"},
{expr: "linkToOtherResource/@linkedAttribute"}] }, where: { condition: [{expr: "@id='16'"}] } }})
Regards
Hi,
Is the join defined in the schema already? In that case you should be able to reference attributes of the linked schema in the query, either in selected nodes or conditions:
var query = NLWS.xtkQueryDef.create( {queryDef: {schema: "nms:recipient", operation: "select", select: { node: [{expr: "@id"}, {expr: "@label"}, {expr: "@internalName"},
{expr: "linkToOtherResource/@linkedAttribute"}] }, where: { condition: [{expr: "@id='16'"}] } }})
Regards
Visualizações
respostas
Total de curtidas
Visualizações
respostas
Total de curtidas
@kattyice, make sure that your node expression is wrapped in square brackets:
{expr: "[linkToOtherResource/@linkedAttribute]"}
Visualizações
respostas
Total de curtidas
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas