modify
This commit is contained in:
@@ -404,7 +404,7 @@ class ActiveRecord extends BaseActiveRecord
|
||||
*/
|
||||
public function hasIn($modelName, $foreignKey, $localKey): mixed
|
||||
{
|
||||
if (!$this->has($localKey)) {
|
||||
if (!isset($this->attributes[$localKey])) {
|
||||
throw new Exception("Need join table primary key.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user