-
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
Cannot use "find" when Model has constructor #25
Comments
From where are you calling |
I think I see your error, you have a syntax error in Also, the attributes you are assigning will not be part of your model's attributes. If you want these values to be in your database as wel, add them to the |
I wanted to create a constructor for my model to give some fields some default values. I created the constructor like this:
My plan requires me to first check if an entry exists with the given key before creating a new one and saving it. When I call "find" on my model, I get a BadMethodCallException: Call to undefined method Jenssegers\Mongodb\Builder::construct()
The text was updated successfully, but these errors were encountered: