Skip to content
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

Model calling Query Builder replace() #957

Closed
natanfelles opened this issue Mar 6, 2018 · 1 comment
Closed

Model calling Query Builder replace() #957

natanfelles opened this issue Mar 6, 2018 · 1 comment

Comments

@natanfelles
Copy link
Contributor

Validation

Model Validation is not running when we call the Query Builder replace().

Using Timestamps

By default, REPLACE deletes and inserts based on a Primary or Unique Key.

Since we can set in the Model if we want to insert/update the datetimes automatically, it may be good already do this automatically in the Model with $builder->set() for the updated_at column using the replace() method. - I think only for the updated_at because an possible created_at would always be automatically reset.

@natanfelles
Copy link
Contributor Author

Closing because this also happens with *Batch() methods.

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

No branches or pull requests

1 participant