Update

Update entity with PrimaryKey:

	
	carbonara.update(db);								
			

Update entity:

	//within transaction
	Update.to(db,carbonara).execute();
							
								
	//without transaction
	Update.to(db,myPizza).executeNoTx();

Update single field

	Update.column(db,tabPizza.colDescription(), "my description")
		.execute(); 

Update few fields only

	Update.to(db,tabPizza)
		.set(new SetFields()
			.setField(tabPizza.colDescription(), "my description")
			.setField(tabPizza.colName(), "my name")
		.execute(); 

Update set null

	int rowsUpdated=Update.to(db,tabPizza)
		.set(new SetFields()
			.setNull(tabPizza.colDescription())
			.setNull(tabPizza.colName())
		.execute(); 

Update with where

	int rowsUpdated=Update.to(db,tabPizza)
		.set(new SetFields()
			.setNull(tabPizza.colDescription())
			.setNull(tabPizza.colName())
		.where(tabPizza.colName(),"PEPPERONI")
		.execute(); 

Before and after update

To execute action before or after update, fill methods beforeUpdate() or afterUpdate()

	@Override
	public void beforeUpdate(Target target) {
		setUpdateDate(new Date());
	}