See #1969018: Field schema foreign keys is always hard-coded to 'node' despite target type not set to node entity type - it means for entity reference fields, you'll need to parse out the relation information from the field settings, rather than the foreign key information.

Comments

David_Rothstein’s picture

It looks like the root cause is this core bug: #1416506: Field schema foreign keys support is broken

Probably does make sense to work around it in this module, though.

I am not sure how I missed this before... I guess the sites I was using this module on were using node references almost exclusively, and that plus the fact that the code in the Entity Reference module looks like it should be setting the foreign keys correctly in all cases made me think this was working everywhere.

checker’s picture

So this is not anymore a problem because #1416506: Field schema foreign keys support is broken is fixed?

dave reid’s picture