It may sometimes be the case that the complexity of the query we are using to retrieve data from the database is dependent on a set of parameters. Joins can be expensive in terms of database performance, particularly when we are joining two entities that can potentially hold millions of records. We may wish to use the same XHTML form and the same piece of code to perform a lookup, yet alter which entities are included in the lookup.
This is best explained by example. Head to the Order Manager Application by firing an OFBiz http request to webapp ordermgr
and log in using the standard ofbiz user login. Select Find Orders.
We can search for orders using a number of different parameters. For now, let's concentrate on just three fields: The Order Id, the ProductId, and the Status Id. Enter our pre-placed orderId of WS10000 into the Order Id field, select Completed as the Status Id and tick the show all records box. We can see that our order has been found.
Now empty the...