Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

No Relations imported! #32

Open
satiye opened this issue Aug 5, 2021 · 4 comments
Open

No Relations imported! #32

satiye opened this issue Aug 5, 2021 · 4 comments

Comments

@satiye
Copy link

satiye commented Aug 5, 2021

Hello, first thanks for that plugin.

I have one to many relations in my collection, for that field also data is not importing, how can I do that?

For export there is no problem, all relations are exported, but while importing the exported file all relations discarded.

Thanks in advance.
Please let me know if you need any further details.

@maximiliano-gt
Copy link

I also have the same question, but structure should the data have in csv file for relations. Something like
[id1, id2] ?

@satiye
Copy link
Author

satiye commented Aug 6, 2021

In the exported csv file that I'm trying to import, the relation exists in a column in the following format
[{"id":1, "xx":"xx",....},{"id":2,"yy":"yy",....}].

I can also see this data in the analyzed table before importing, but no relations are imported into collections.

@maximiliano-gt
Copy link

maximiliano-gt commented Aug 6, 2021

I also tried various fromats but non of them are working, also with [{"_id": "1" , "_id": "2", ...}]. For one-one relation works perfect with the id as an string. But with one-many relation i cannot find the way to make it works yet

@maximiliano-gt
Copy link

maximiliano-gt commented Aug 6, 2021

@satiye i solved it! you need to add the property "relationType": "MANY_RELATIONS" to the strapi model settings.json and use id without underscore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants