I have many to many relationship in mongodb in collection A i have key (dynamicFieldValue) in which i story objects with id and key as you can see screen attached image
in collection B i have key as ticket_ids in which i store id tickets.
now i have to create relationship between them and get data for cubeJS
joins: {
DynamicFields : {
sql: `${CUBE}.dynamicFieldsValue.*._id = ${DynamicFields}._id`,
relationship: `belongsTo`
}
},
It shows me an error
parse sql ‘SELECT
dynamic_fields
.namedynamic_fields__name
, count(tickets
._id)tickets__count
FROM
tickeingSystem
.tickets AStickets
LEFT JOINtickeingSystem
.dynamic_fields ASdynamic_fields
ON
tickets
.dynamicFieldsValue.*._id =dynamic_fields
._id GROUP BY 1
ORDER BY 2 DESC LIMIT 5000′ error: unexpected TIMES at position 246