-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing primary key breaks getKey() #8
Comments
Can you check if it is working with this last fix? |
Yes it is working. Thanks very much! |
Closed
This was referenced Nov 26, 2018
alcaeus
pushed a commit
to alcaeus/laravel-mongodb
that referenced
this issue
Aug 16, 2023
alcaeus
pushed a commit
that referenced
this issue
Aug 22, 2023
3 tasks
mnphpexpert
added a commit
to mnphpexpert/laravel-mongodb
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I extend MongoDB Eloquent and set my own
$primaryKey = 'myId'
, calling$this->getKey()
returnsnull
. 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.The text was updated successfully, but these errors were encountered: