Hi Team, I am facing below issue when I try to access the Element of type Memo using query def:
export const queryDef = (schemaName: string, id: string, customProps: Record<string, XtkSchemaNode>): QueryDef => { const query = { operation: 'get', schema: schemaName, select: { node: [{ expr: '@id' }], }, where: { condition: [ { expr:@id = ${id}, }, ], }, }; Object.keys(customProps).map((propKey: string) => { query.select.node.push({ expr: customProps[propKey]?.parent?.parent?.id != schemaName || propKey.includes('-id') ?[${customProps[propKey].nodePath.slice(1)}]// Non Root children Attributes :${customProps[propKey].nodePath.slice(1)}, // Root children Attributes }); }); return query; };
It is returning memo field as empty object like below:
testmemoElement: {}
But it is expected to come as below:
$testmemoElement: ""
I am using two field of type element those are CDATA and memo. but CDATA is coming as expected, when it is empty. memo field is coming as empty object when it is empty.
Hi Team, I am facing below issue when I try to access the Element of type Memo using query def:
export const queryDef = (schemaName: string, id: string, customProps: Record<string, XtkSchemaNode>): QueryDef => { const query = { operation: 'get', schema: schemaName, select: { node: [{ expr: '@id' }], }, where: { condition: [ { expr:
@id = ${id}, }, ], }, }; Object.keys(customProps).map((propKey: string) => { query.select.node.push({ expr: customProps[propKey]?.parent?.parent?.id != schemaName || propKey.includes('-id') ?
[${customProps[propKey].nodePath.slice(1)}]// Non Root children Attributes :
${customProps[propKey].nodePath.slice(1)}, // Root children Attributes }); }); return query; };
It is returning memo field as empty object like below: testmemoElement: {} But it is expected to come as below: $testmemoElement: ""I am using two field of type element those are CDATA and memo. but CDATA is coming as expected, when it is empty. memo field is coming as empty object when it is empty.