Skip to content

fix hash extra conditions for joins#13

Open
dimadimx wants to merge 1 commit intotigron:masterfrom
dimadimx:feature/fix_join_extra_conditions
Open

fix hash extra conditions for joins#13
dimadimx wants to merge 1 commit intotigron:masterfrom
dimadimx:feature/fix_join_extra_conditions

Conversation

@dimadimx
Copy link

@dimadimx dimadimx commented Oct 27, 2025

correct hash saving join extra condition
now if we use "get_options_from_hash" we return join without extra conditions

$pager = new Pager('order_item');
$condition = new \Skeleton\Pager\Sql\Condition('product.classname', '=', \Product_Ticket::class);
$pager->add_join('product', 'order_item_id', 'order_item.id', $condition);
$pager->page();

$hash = $pager->create_options_hash();
$pager2 = \Skeleton\Pager\Pager::get_by_options_hash($hash);
$pager2->page();

$pager and $pager2 will have different results because $pager2 will be without the condition "'product.classname', '=', \Product_Ticket::class", which is an extra join condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant