Skip to content

use mongodb driver to check for dirtiness #1664

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

Closed
wants to merge 1 commit into from

Conversation

halaei
Copy link
Contributor

@halaei halaei commented Nov 29, 2018

To check if a field is dirty we can simply use fromPHP() function of the mongodb driver. Besides, we shouldn't use the SQL-specific logic of Illuminate\Eloquent\Model::originalIsEquivalent() for mongodb. In sql, fields keep their schema data types and changing integer 1 to string '1' actually does nothing. However, in mongodb fields accept their types as they are inserted/updated. Therefore, if we change value of a field from (int)1 to (string)'1' we actually must regard it as dirty.

This change is backward incompatible. Don't know if anyone likes the current behaviour more.

@divine
Copy link
Contributor

divine commented Jan 20, 2020

Hello!

Could you please take care for conflicting file or we can take a look?

Thank you for your contribution!

@divine
Copy link
Contributor

divine commented Feb 23, 2020

Hi there,

This PR contains a breaking change and will be released within next version.

Closing for now.

Thanks.

@divine divine closed this Feb 23, 2020
@halaei
Copy link
Contributor Author

halaei commented Mar 5, 2020

@divine I am glad this project became active. I'll send a PR within a day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants