revelrylabs / ecto_soft_delete

Soft Deletion for Ecto
MIT License
113 stars 28 forks source link

Support soft delete when join. #139

Open c20020207 opened 3 years ago

c20020207 commented 3 years ago

When you join right now, you still need to add not is_nil(deleted_at) during join. It is really easy to forget to add as normally you don't need to think about it as it is automatically handled by the library. Tried to modify the Repo, but not sure if there is any way to do the dynamic binding in the query. (as you can use query.joins to figure out how many join it is, theoretically if there is any way to loop build the query, it might work( Happy to discuss or implement if anyone have any ideas.