Is the any other way to delete all rows of a database table without writing an SQL delete statement?
List<Item> items = Ebean.find(Item.class).findList();
Ebean.delete(items);
Is there anything like
Ebean.deleteAll(Item.class)
in Ebean API?
Is the any other way to delete all rows of a database table without writing an SQL delete statement?
List<Item> items = Ebean.find(Item.class).findList();
Ebean.delete(items);
Is there anything like
Ebean.deleteAll(Item.class)
in Ebean API?
Indeed it exists, check this out
Delete all the beans from a Collection.
public static int delete(Collection<?> c)
throws javax.persistence.OptimisticLockException