I want to add another field, which needs to be accessible by views (for display and ordering), to the entityreference table field_data_field_FIELDNAME. Structure of that table is:
- entity_type VARCHAR(128)
- bundle VARCHAR(128)
- deleted TINYINT(4)
- entity_id INT(10)
- revision_id INT(10)
- language VARCHAR(32)
- delta INT(10)
- field_FIELDNAME_target_id INT(10)
I want to have a column storing DateTime information here, so I can attach information about when this reference was added/ updated for that referenced entity. There also needs to be a way to save the newly added field directly in the array structure for that reference such as:
$node->field_reference['und'][] = array(
'target_id' => 123,
'my_new_column' => '2014-03-13 15:29:29'
);
I know I could solve this by using field_collections or relation module, but both would cause significant performance issues.