From 870fb5d37c0e8f89f56fe55a37862491028cf54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 1 Jul 2025 19:16:40 +0200 Subject: [PATCH] tests: add comment to clarify the chosen path --- tests/RLS/TableManagerTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/RLS/TableManagerTest.php b/tests/RLS/TableManagerTest.php index 366bd67f..ef972f3b 100644 --- a/tests/RLS/TableManagerTest.php +++ b/tests/RLS/TableManagerTest.php @@ -453,6 +453,10 @@ test('table rls manager generates shortest paths that lead to the tenants table 'foreignId' => 'id', ], [ + // Importantly, the best path goes through authors + // since ratings -> posts is nullable, as well as + // posts -> tenants directly (without going through + // authors first). 'foreignKey' => 'author_id', 'foreignTable' => 'authors', 'foreignId' => 'id',