File tree Expand file tree Collapse file tree 4 files changed +5
-7
lines changed
Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ public function whereKeyNot($id)
118118
119119 // If this is our first where clause we can add the omit directly
120120 if (sizeof ($ this ->wheres ) === 0 ){
121- return $ this ->where ($ this ->model ->getKeyName (), $ id )->omit ();
121+ return $ this ->where ($ this ->model ->getKeyName (), ' == ' , $ id )->omit ();
122122 }
123123
124124 // otherwise we need to add a find and omit
125- return $ this ->orWhere ($ this ->model ->getKeyName (), $ id )->omit ();
125+ return $ this ->orWhere ($ this ->model ->getKeyName (), ' == ' , $ id )->omit ();
126126 }
127127
128128
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ public function addConstraints()
1717 // For belongs to relationships, which are essentially the inverse of has one
1818 // or has many relationships, we need to actually query on the primary key
1919 // of the related models matching on the foreign key that's on a parent.
20- $ table = $ this ->related ->getTable ();
21-
22- $ this ->query ->where ($ this ->ownerKey , '= ' , $ this ->child ->{$ this ->foreignKey });
20+ $ this ->query ->where ($ this ->ownerKey , '== ' , $ this ->child ->{$ this ->foreignKey });
2321 }
2422 }
2523}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class HasMany extends \Illuminate\Database\Eloquent\Relations\HasMany
1515 public function addConstraints ()
1616 {
1717 if (static ::$ constraints ) {
18- $ this ->query ->where ($ this ->foreignKey , '= ' , $ this ->getParentKey ());
18+ $ this ->query ->where ($ this ->foreignKey , '== ' , $ this ->getParentKey ());
1919 }
2020 }
2121
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class HasOne extends \Illuminate\Database\Eloquent\Relations\HasOne
1414 public function addConstraints ()
1515 {
1616 if (static ::$ constraints ) {
17- $ this ->query ->where ($ this ->foreignKey , '= ' , $ this ->getParentKey ());
17+ $ this ->query ->where ($ this ->foreignKey , '== ' , $ this ->getParentKey ());
1818 }
1919 }
2020}
You can’t perform that action at this time.
0 commit comments