File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
src/Illuminate/Database/Eloquent Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -1967,6 +1967,16 @@ public function getQualifiedKeyName()
19671967 return $ this ->getTable ().'. ' .$ this ->getKeyName ();
19681968 }
19691969
1970+ /**
1971+ * Get the auto incrementing key type.
1972+ *
1973+ * @return string
1974+ */
1975+ public function getKeyType ()
1976+ {
1977+ return $ this ->keyType ;
1978+ }
1979+
19701980 /**
19711981 * Get the value of the model's route key.
19721982 *
@@ -2377,16 +2387,6 @@ public function getIncrementing()
23772387 return $ this ->incrementing ;
23782388 }
23792389
2380- /**
2381- * Get the value indicating the auto incrementing key type.
2382- *
2383- * @return string
2384- */
2385- public function getKeyType ()
2386- {
2387- return $ this ->keyType ;
2388- }
2389-
23902390 /**
23912391 * Set whether IDs are incrementing.
23922392 *
Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ protected function getEagerModelKeys(array $models)
174174 // null or 0 in (depending on if incrementing keys are in use) so the query wont
175175 // fail plus returns zero results, which should be what the developer expects.
176176 if (count ($ keys ) === 0 ) {
177- return [$ this ->related ->getIncrementing () && $ this ->related ->getKeyType () === 'int ' ? 0 : null ];
177+ return [$ this ->related ->getIncrementing () &&
178+ $ this ->related ->getKeyType () === 'int ' ? 0 : null ];
178179 }
179180
180181 return array_values (array_unique ($ keys ));
You can’t perform that action at this time.
0 commit comments