Commit 13868dc
committed
Fix PostgreSQL compatibility issue with eager loading and fix test failures
This change introduces a custom `VisitsHasOne` Eloquent relation to ensure that model keys are cast to strings when eager loading the `visits` relationship. This prevents the "operator does not exist: character varying = integer" error in PostgreSQL.
Additionally, `tests/TestCase.php` has been updated to include `protected static $latestResponse = null;` to fix "Access to undeclared static property" errors encountered in some environments running newer versions of Orchestra Testbench / PHPUnit.
Added a regression test `tests/Feature/PostgresCompatibilityTest.php` to verify the PostgreSQL compatibility fix.1 parent e6f1f22 commit 13868dc
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
0 commit comments