gorm icon indicating copy to clipboard operation
gorm copied to clipboard

Document batch delete by providing slice of structs

Open jpmeijers opened this issue 2 years ago • 2 comments

Describe the feature

When doing a db.Delete and passing a slice of structs, GORM will do a batch delete of all elements in the slice. This is not clearly documented. Let's add this to the documentation for clarity.

See: https://stackoverflow.com/q/75362946/5343140

Motivation

The documentation is not clear on this.

Related Issues

jpmeijers avatar Feb 06 '23 15:02 jpmeijers

Welcome to create a PR for it. https://github.com/go-gorm/gorm.io

a631807682 avatar Feb 08 '23 06:02 a631807682

Seems like the documentation is clear about it now: https://gorm.io/docs/delete.html#Batch-Delete

dogenkigen avatar Dec 02 '23 12:12 dogenkigen