In entity_test_schema:

    'foreign keys' => array(
      'uid' => array('users' => 'uid'),
      'name' => array('entity_test_types' => 'name'),
    ),

But SchemaAPI reference http://drupal.org/node/146939 says:

> 'foreign keys': An associative array of foreign keys ('keyname' => specification). Each specification is an array with 'table' and 'columns' elements that form a foreign key for the table.

This causes failing tests for the patch at #1195718: Use "foreign keys" to create metadata properties.

CommentFileSizeAuthor
#3 fk_schema_fix-1651824-3.patch653 bytesjon nunan

Comments

fago’s picture

indeed, patch welcome!

joachim’s picture

I would, but I can't tell which table this points to:

'name' => array('entity_test_types' => 'name'),

jon nunan’s picture

Status: Active » Needs review
StatusFileSize
new653 bytes

I think the format currently in entity_test schema is

[fk name] => array([foreign table] => [source field name]

when it should be

[fk name] => array(
  'table' => [foreign table],
  'columns' => array([source field name] =>[referenced field name])
)

Patch attached.

joachim’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Looks good to me.

fago’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

  • fago committed 95a1bca on 7.x-1.x authored by meatsack
    Issue #1651824 by meatsack | joachim: Fixed 'entity_test' table has...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.