Delete

Delete entity with PrimaryKey:

	
	carbonara.delete(db);								
			

Delete entity:

	//within transaction
	Delete.from(db,tabPizza).execute();
	//without transaction
	Delete.from(db,tabPizza).executeNoTx();							
	

Delete with where

	int rowsDeleted=Delete.to(db,tabPizza)
		.set(new SetFields()
			.setNull(daoPizza.colDescription())
			.setNull(daoPizza.colName())
		.where(dao.Pizza.colName(),"PEPPERONI")
		.execute(); 

Before and after delete

To execute action before or after delete, fill methods beforeDelete() or afterDelete()

	@Override
	public void beforeDelete(Target target) {
		System.out.println("Entity to delete: "+getId()+");
	}