
How can I import records with a Has and belongs to many relation
Hi Guys,
I've tried to import records of 2 models which has a "Has and belongs to many" relationship.
The case:
The two models: owners and houses.
(An owner could have 1 or more houses, and house could have 1 or more owners)
I want to import with 1 file to the owners model. But when I do an owner gets only 1 house.
I've tried several settings for the import definition with duplication and update.
Duplication on owner and house and update owner and house.
Is it possible to successfully import a Has and Belongs to many?
If it's possible, how can I do this?
Hi Guys,
I've tried to import records of 2 models which has a "Has and belongs to many" relationship.
The case:
The two models: owners and houses.
(An owner could have 1 or more houses, and house could have 1 or more owners)
I want to import with 1 file to the owners model. But when I do an owner gets only 1 house.
I've tried several settings for the import definition with duplication and update.
Duplication on owner and house and update owner and house.
Is it possible to successfully import a Has and Belongs to many?
If it's possible, how can I do this?
-
You can build one import model to import the data. Next you build an action which loops all records and creates the records in the two models with the relation.