Ctools uses hook_field_schema to determine foreign key information to provide entity relationships represented in fields. The attached patch adds foreign key info to field_collection_field_schema in the .install file so that ctools understands how to create a relationship from an entity to its field collection items. Since foreign key info does not modify the database in D7, no update is required.

Comments

Status: Needs review » Needs work

The last submitted patch, field_collection-foreign_keys.patch, failed testing.

Josh Benner’s picture

Status: Needs work » Needs review
StatusFileSize
new491 bytes

Was -p0 the issue? Here's a -p1 patch to try...

jmuzz’s picture

Issue summary: View changes
Status: Needs review » Needs work

Seems like a good idea, but it needs 2 things:

  • A foreign key to the revision table since revisions have been added.
  • A test case, even if not automated. Can you provide an example of how ctools or a module that relies on it will use the keys so it can be seen to work correctly?

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: field_collection-foreign_keys-1529850-3.patch, failed testing.