File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -221,16 +221,16 @@ private function magicJoinOnOneQuery(MagicJoinSelect $magicJoinSelect)
221221 // Let's remove the main table from the list of tables to be linked:
222222 unset($ tables [$ mainTable ]);
223223
224- $ foreignKeysSet = new \ SplObjectStorage () ;
224+ $ foreignKeysSet = [] ;
225225 $ completePath = [];
226226
227227 foreach ($ tables as $ table ) {
228228 $ path = $ this ->getSchemaAnalyzer ()->getShortestPath ($ mainTable , $ table );
229229 foreach ($ path as $ foreignKey ) {
230230 // If the foreign key is not already in our complete path, let's add it.
231- if (!$ foreignKeysSet-> contains ( $ foreignKey )) {
231+ if (!isset ( $ foreignKeysSet[ $ foreignKey -> getName ()] )) {
232232 $ completePath [] = $ foreignKey ;
233- $ foreignKeysSet-> attach ( $ foreignKey ) ;
233+ $ foreignKeysSet[ $ foreignKey -> getName ()] = true ;
234234 }
235235 }
236236 }
You can’t perform that action at this time.
0 commit comments