Hi, in my data structure two tables are linked via a third table. So classes and their attributes are linked in the link table where each row contains a class_id and an attribute_id.
How would I build this link in a SyncSet?
You can find my approach below. It does not work and I don’t know how to encode which field of the class_attributes_link table is linked to which other field in the other tables.
Thanks for your help!
{
“id”: “syncSetSelectedClass”,
“sources”: [
“classes_ds”,
“classAttributes_ds”,
“class_attributes_link_ds”
],
“joins”: [
{
“datasource”: “classes_ds”,
“columns”: [
“class_id”
]
},
{
“datasource”: “classAttributes_ds”,
“columns”: [
“attribute_id”
]
},
{
“datasource”: “class_attributes_link_ds”,
“columns”: [
“class_id”,
“attribute_id”
]
}
],
“syncMap”: [
{
“source”: “classes_ds”,
“targets”: [
“class_attributes_link_ds”
]
},
{
“source”: “class_attributes_link_ds”,
“targets”: [
“classAttributes_ds”
]
}
]
}