- Notifications
You must be signed in to change notification settings - Fork 377
Closed as not planned
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
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
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue