- Issue created by @jordik
- Status changed to Needs review
10 months ago 10:55pm 25 March 2024 - 🇦🇹Austria jordik
Small change - adding hardcoded 'entity_id' for the query table field. Works like a charm now.
- Status changed to Needs work
1 day ago 1:44am 21 January 2025 - 🇮🇩Indonesia gausarts
@jordik , thank you for your work!
I need to make taxonomy and other entities sortable as well.
I made it work for entities by replacing this line:
+ $column = $field_name . '_value'; + $table_alias = $table . '__' . $field_name;
With this:
+ $field_definition = $this->getBundleFieldDefinition(); + $column = $field_name . '_value'; + + if ($field_definition->getType() == 'entity_reference') { + $column = $field_name . '_target_id'; + } + + $table_alias = $table . '__' . $field_name;
If you could update it to support entities like above or any other way, that would be great.
Considering it is assigned to you, I would leave it to maintainers' and your consideration.