I would like to add that today I have enhanced the DSL available in all Groovy scripts in OFBiz by adding support for the EntityUtil class.
From within a Groovy script you can now run queries in the following ways: // select all fields from one order header record orderHeader = from('OrderHeader').where('orderId', orderId).queryFirst() // ... or the equivalent orderHeader = select().from('OrderHeader').where('orderId', orderId).queryFirst() // select only two fields from the order header record orderHeader = select(‘orderId’, ‘orderDate’).from('OrderHeader').where('orderId', orderId).queryFirst() The OrderView.groovy file has some examples of its usage. I think this is a very user friendly way of running queries and I am sure users will like it. Jacopo On Nov 10, 2014, at 6:49 PM, Pierre Smits <pierre.sm...@gmail.com> wrote: > Scott, > > I noticed you recently started to change various areas of code from .find > (functionality) to the new entityquery implementation. As find operations > take place on various level throughout the entire set of functionalities in > OFBiz there is a lot to get converted. This not only applies to java code, > but also to groovy code and even to areas in simple services and screens > and forms. All in all a enormous endeavour for this community, let alone > for just one contributor. > > Could you do a page in the technical wiki explaining how it all works and > provide some examples so that others can: > > - assist you in those areas > - take proper notice of this new functionality when they are working on > new applications and/or solutions. > > With such a page not only we can try to speed up the transition, but we > also help to avoid regressions. > > Regards, > > Pierre Smits > > *ORRTIZ.COM <http://www.orrtiz.com>* > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com