Does anyone have any experience representing many-...
# prisma-whats-new
n
Does anyone have any experience representing many-to-many relations in Normalized Data Format?
d
You shold just be able to create one relations-item per pair in the many-to-many relation. So if you have a Relation(typeA fieldA <-> typeB fieldB) typeA typeB id1 <-> id2 id1 <-> id3 id4 <-> id3 for example in a many to many relation, just create three entries for the relations array
Copy code
[
      { "_typeName": "typeA", "id": "id1" "fieldName": "fieldA" },
      { "_typeName": "typeB", "id": "id2", "fieldName": "fieldB" } 
],
[
{ "_typeName": "typeA", "id": "id1" "fieldName": "fieldA" },
{ "_typeName": "typeB", "id": "id3", "fieldName": "fieldB" }
],
[
{ "_typeName": "typeA", "id": "id3" "fieldName": "fieldA" },
{ "_typeName": "typeB", "id": "id3", "fieldName": "fieldB" }
],
n
Thank you @do4gr
d
No problem. Let me know if you have more questions around import/export or run into problems or bugs