Closed as not planned
Description
The docs seem to suggest I can define a custom delete method on my repository in the same way I can define a custom query method. For example:
@Table
data class Entity(val name: String, @Id val id: UUID? = null)
interface EntityRepository : CrudRepository<Entity, UUID> {
fun deleteByName(name: String)
}
However, calling the method doesn't delete anything. Enabling debug logging for Spring Data, it looks like Spring is attempting to query instead of delete:
SELECT "ENTITY"."ID" AS "ID", "ENTITY"."NAME" AS "NAME" FROM "ENTITY" WHERE "ENTITY"."NAME" = ?
Is this actually supported? The docs are slightly vague in the sense that they only really mention it in passing.
Reproducable example: https://github.com/chris-unlikelyai/springdataissue2