I'm in the process of making a Phonegap application to create nodes of a certain content type. The site I'm writing data to/getting data from utilises Field Collection module, and I've looked at the database structure. It creates additional tables for the contained fields and cross-references them. I was wondering if anyone has come across this situation and how did you manage to solve it.
Note:
I'm using Drupal Services for endpoint, and my request needs to send all those fields in my fiddle altogether (more than one row).
As for what the fiddle does, I'm creating a table then add more rows to the table.
field_collection_items
and all the fields inside the field collection are stored in their own table (normal drupal way). Then inside the fields there is a column calledbundle
which holds the value of thefield_name
from the field collection item, creating a 1:m relationship. You can insert into thefield_collection_item
table then loop through the field values and insert them one by one adding the relationship through the bundle col