We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using an Inspector with a custom query using a belongs-to relation the controller will create a query using wrong aliases resulting in a crash.
Config example:
return array( 'model' => 'Model_With_BelongsTo', 'query' => array( 'model' => 'Model_With_BelongsTo', 'related' => array('relation'), 'callback' => function ($query) { return $query->where('relation.field', 1); } ), 'input' => array( 'key' => 'id', ) );
Will create something similar to
SELECT COUNT(DISTINCT `t0`.`id`) AS count_result, `t1`.`id` AS `t1_c0`,`t1`.`other_fields_from_t0` AS `t1_c1`, `t1`.`t1_real_fields` as `t1_c2` FROM `table_0` AS `t0` LEFT JOIN `table_2` AS `t1` ON (`t0`.`rel_id` = `t1`.`id`) WHERE `t0`.`id` = 1
The where is executed on the wrong table and half the fields are selected on the wrong alias too.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using an Inspector with a custom query using a belongs-to relation the controller will create a query using wrong aliases resulting in a crash.
Config example:
Will create something similar to
The where is executed on the wrong table and half the fields are selected on the wrong alias too.
The text was updated successfully, but these errors were encountered: