Closed (duplicate)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2012 at 13:24 UTC
Updated:
2 Feb 2012 at 06:48 UTC
The entity from field relationship currently checks for the source column when it looks for valid relationships. This is wrong since we are looking into getting a relationship through the field to the destination column, and the two columns doesn't really match all the time, for instance in the Entity reference module, where the source column is called target_id.
The attached patch uses array_search instead to find the destination column rather than the source column.
| Comment | File | Size | Author |
|---|---|---|---|
| entity-from-field-check-destination-column-1.patch | 881 bytes | fabsor |
Comments
Comment #1
damien tournoud commentedThis is correct, the definition of a relationship is indeed
source column => destination column.Comment #2
merlinofchaos commentedIs this related to #1394124: Accurately reference foreign keys in entity_from_field relationship ?
Comment #3
damien tournoud commentedThose two definitely touch the same part of the code. There is *a lot* going on in the other patch, so it is unclear what the exact rationale for it is. This said, the buggy line is still in the other patch, so I would recommend getting this one in (as it is an obvious bug fix), and looking if the other is still necessary after that.
Comment #4
fabsor commentedI think both patches are working on solving the same problem. I have merged both patches and added a it in #1394124: Accurately reference foreign keys in entity_from_field relationship.