-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Feature] Restore function #121
Comments
this wont work due to ecto casting nil to utc_datetime_usec raw query is required, fixed in pr #143 |
We have a functino def restore(struct) do
struct
|> Ecto.Changeset.change(%{deleted_at: nil})
|> Repo.update()
end |
hmmm i dont see it in the repo nor in the hex.docs, however when i try to nil a datestamp by running restore() as specified above in postgres ecto casts it to now(), i believe this is the default behaviour of ecto for date/time types as i see many discussions about it. |
No I mean, we have added this function into our code ^^
|
It could be nice to have a function to restore a soft deleted entity.
something like the following code sample in the file https://github.com/revelrylabs/ecto_soft_delete/blob/master/lib/ecto/soft_delete_query.ex
The text was updated successfully, but these errors were encountered: