Save will either insert or update the bean depending on its state.

Order order = new Order();
order.setOrderDate(new Date());
// insert the order;

If the bean was fetched it will be updated...

Order order = Ebean.find(Order.class, 12);
// update the order;

Save and Delete will CASCADE based on the CascadeType specificed on the associated @OneToMany, @OneToOne etc annotation.

By default save and delete will not cascade so you need to specify a cascade type (such as the one on details below) for save() or delete() to cascade.

// the Entity bean with its Mapping Annotations
public class Order {

        // no cascading
    Customer customer;

        // save and delete cascaded
    List<OrderDetail> details;

Note the @OneToMany(cascade=CascadeType.ALL) on the details property. This means save() and delete() will both casade from order to its order details.

// save the order ...  will cascade also saving the order details;

Delete is very similar to save. Just call Ebean.delete();

Order order = Ebean.find(Order.class, 12);

// delete the order
// ... this will cascade also deleting the order details
// ... with either CascadeType.ALL or CascadeType.REMOVE

Go here to see how Transaction demarcation is done.

Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements