Complete Object-Relational Mapping

Through interface based relations, Daobab is trully object orienteted.

Select some pizza, and a size

Pizza roma=Select.one(db,tabPizza).where(tabPizza.colName(),"ROMA").result();
PizzaSize small_size=Select.one(db,tabPizzaSize).where(tabPizza.colName(),"Small").result();

Get the prices - by relations (by interfaces):

Double roma_price=Select.field(db,tabPizzaPrice,colPrice())
	.where(AND().and(tabPizzaPrice.colPizzaId(),roma)
		.and(tabPizzaPrice.colPizzaSize(),small_size)
	.result()

Daobab accepts only objects having related column and prevent against committing a mistake.

However, Daobab can do this even simplest by build in find* methods, attached to PrimaryKey interface:

PizzaPrice roma_small_price=roma.findRelatedOneByCross(db,tabPizzaPrice,tabPrice); 

Get all prices of pizza Roma:

List all_prices=roma.findRelatedMany(db,tabPizzaPrice);