I am importing thousands of database records in a one-to-many relationship. I used the CSV import plug-in, and am now beginning the programmatic creation of relationships. I understand the structure of the exp_relationships table, but am stumped by what I’m seeing.
To isolate the problem, I have created two test weblogs—one parent and one child. I have one record in each, and a relationship field in the parent weblog pointing to the child weblog. If I edit the parent record and allow ee to create the exp_relationships record, all works as expected. I then remove the relationship via the “Edit” screen.
If I then manually create an identical exp_relationships record (minus the rel_data serialized data), the relationship is NOT established when I edit the parent record. The relationship field is blank.
Now here’s the clincher: if I create the relationship from the “Edit” screen then clear the rel_data field in the database, THE RELATIONSHIP REMAINS. So the absence of the rel_data when manually creating the exp_relationships record is not the issue.
Apparently, there is some other place the relationship data is established/cached. I have repeatedly cleared all caches, to no avail.
This problem is holding up the development of a site on my fresh new personal license. I am using 1.6.0.
Can anyone help?
Thanks!