Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

ORDER BY some_custom_field not working #189

Open
Detsieber opened this issue Aug 16, 2019 · 0 comments
Open

ORDER BY some_custom_field not working #189

Detsieber opened this issue Aug 16, 2019 · 0 comments

Comments

@Detsieber
Copy link

I am using \Civi\Api4\CustomValue::get

However, when a try to order by some custom field, the generated code throws an SQL error:

ERROR 1054 (42S22): Unknown column 'a.Example_Field' in 'order clause

The generated SQL code looks as follows:

SELECT *
FROM civicrm_value_example_20 a
ORDER BY a.Example_Field ASC

Instead, it should be:

SELECT *
FROM civicrm_value_level_individ_20 a
ORDER BY a.example_field_87 ASC

(Remark: This looks a bit alike #110 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant