diff --git a/java/working-with-cql/query-execution.md b/java/working-with-cql/query-execution.md index 699ab183d1..e3c953b50e 100644 --- a/java/working-with-cql/query-execution.md +++ b/java/working-with-cql/query-execution.md @@ -218,10 +218,16 @@ The [delete](./query-api) operation is cascaded along the entity's compositions. The following example deletes the order with ID *1000* including all its items: ```java -CqnDelete delete = Delete.from("bookshop.Orders").matching(singletonMap("OrderNo", 1000)); -long deleteCount = service.run(delete).rowCount(); +long deleteCount = service.run(Delete.from("bookshop.Orders").byId(1000)).rowCount(); ``` +::: tip +To disable cascade delete for a specific Delete statement, add a hint(#hana-hints): +```Java +Delete.from("bookshop.Orders").byId(1000).hint("cascade.delete", false); +``` +::: + ## Views and Projections { #views } With CDS [views](../../cds/cdl#views-projections) you can derive new entities from existing ones, for example to rename or exclude certain elements, or to add [virtual elements](../../cds/cdl#virtual-elements-in-views) for specific use cases.