Having looked over the project, this appears to be what i need but I on't seem to be able to get it to work.
my use case:

I have 2 content types "players" and "Teams"
on the player content type there is an entity reference field mapping to Teams.
A player can be on many teams.

Guid,player,team
P01, Bob Smith, "Team A, Team B, Team C"
P02, Jane SMith, "Team B, Team C"
P03, Fred Smith, "Team A"

I'm using feeds tamper to explode the comma separated values. but its not importing ( I get nothing in the entity reference field).

any ideas? I have imported the Teams already into the system, and they have there own GUID, so i guess i could refactor my csv to be:

Guid,player,teamguid
01, Bob Smith, "T01, T02, T03"
02, Jane SMith, "T02, T03"
03, Fred Smith, "T01"

any ideas would be greatly appreciated

Comments

gnucifer’s picture

So team is a content type referenced to in a field on the player content type you are imporing? If you explode the GUID, and map it to the GUID field (provided by this module, not entityreference) on the player content type, it should work. Could you post a screenshot of your current setup (the field mappings)? Entity reference feeds will silently ignore (perhaps I should fix this, and provide some kind of user notification) all imports if a unique guid is not properly mapped.

Another problem I see is that you don't seem to have any other properties beside the GUID in the cvs. It should look more like this:

Guid,player,team_title, team_guid
P01, Bob Smith, "Team A, Team B, Team C", "T01, T02, T03"
P02, Jane SMith, "Team B, Team C", "T02, T03"
P03, Fred Smith, "Team A", "T01"

If everything is mapped correctly (for example: "player" to the player content type's title, "Guid" to the player content types's GUID target, "team_title" to the team content type's title, and "team_guid" to the GUID target etc) 6 nodes will be created on import.

"Bob Smith" (title: "Bob Smith", referencing team A, B and C)
"Jane Smith" (title: "Jane Smith", referencing team B and C)
"Fred Smith" (title: "Fred Smith", referencing team A)

and

"Team A" (title: "Team A")
"Team B" (title: "Team B")
"Team C" (title: "Team C")

But in your example team title is missing from the cvs data, and that will probably cause the import to fail or produce weird results.

dean clayton’s picture

Yes you are correct, a reference to the team content type is on the player content type.

The reason i only have a few fields is due to running the "references" as a separate import. I have already created a Team and player feeds to load the rest of the data.

so if i understand correctly I need to include the team title as well the Team Guid in the feed even though I have already imported the teams?

I'll give it another go this week and let you know

gnucifer’s picture

In that case you don't need this module, since it's written to create the entities in-place if you have all the data in just one feed. For your purpose the mapper provided by the entityreference module will work just fine, just make sure to run the teams importer first. The guids of teams in the player feed must also correspond to the guids of the teams imported by the other feed.

dean clayton’s picture

Status: Active » Closed (works as designed)

ok great thanks for explaining