If I extend MongoDB Eloquent and set my own $primaryKey = 'myId', calling $this->getKey() returns null. However, I can access the key using $this->_id and not $this->myId. I think that the original primary key for some reason is not being re-declared in the extended class.