/** Handle quantity deletion */ public static Result delete(Long id) { Quantity quantity = Quantity.find.ref(id); Long profileId = quantity.getProfileId(); quantity.delete(); flash("success", "quantity has been deleted"); return list(0, "name", "asc", "", profileId); }