look at framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntitySQLProcessor.bsh
vijay Si sent the following on 9/15/2007 10:27 AM: > Jonathon > > It seems that other option left is to use a jdbc connection to database. Is > it also imperative then, that for very complex querries having > "groupby"..."having" and other clauses it is better to use jdbc method of > connection. > > How does it affect the ofbiz philosophy of architecture if i use jdbc for > executing these querries. As right now i cannot find any ways of > implementing those aggregate functions(sum,min,max...) through Entity Engine > (without creating views). Also do you have any idea of performance behaviour > on using jdbc connection? > > Thanks. > > > On 9/15/07, Jonathon -- Improov <[EMAIL PROTECTED]> wrote: >> There's no other (easy) way to query database, aside from using the Entity >> Engine (which was what >> I suggested). >> >> If you're worried about performance hit with a huge (and unconditional) >> cross-product, see >> http://www.nabble.com/forum/ViewPost.jtp?post=12590081&framed=y and >> https://issues.apache.org/jira/browse/OFBIZ-1232 >> >> Jonathon >> >> vijay Si wrote: >>> Hi Jonathon, >>> >>> i cannot use the view-entity for querrying, as it would cause a >> performance >>> hit. Is there any other method to get the above querry. Do u know of any >>> ways to do it through bsh script. >>> >>> >>> Regards >>> >>> >>> On 9/15/07, Jonathon -- Improov <[EMAIL PROTECTED]> wrote: >>>> Use the GenericDelegator and related classes, I think. Or maybe not. I >>>> can't recall the aggregate >>>> functions there. >>>> >>>> The entity definitions do have those, though. The <view-entity>? Oh >> yes, >>>> the <view-entity>. >>>> >>>> Try using DynamicViewEntity to construct a <view-entity>. >>>> >>>> Jonathon >>>> >>>> vijay Si wrote: >>>>> Is there any funtionality provided for using aggregate functions >>>>> (sum,min,max..) and count() for querrying to data base through bsh. >>>>> >>>>> for egg: how can we write following in BSH : >>>>> >>>>> Select sum(order_id),sum(grand_total) from order_header where >>>>> order_type_id="PURCHASE_ORDER"; >>>>> >>>>> Regards >>>>> >>>>> >>>>> >>>>> >> ------------------------------------------------------------------------ >>>>> No virus found in this incoming message. >>>>> Checked by AVG Free Edition. >>>>> Version: 7.5.487 / Virus Database: 269.13.19/1008 - Release Date: >>>> 9/14/2007 8:59 AM >>>> >>>> >>> >>> ------------------------------------------------------------------------ >>> >>> No virus found in this incoming message. >>> Checked by AVG Free Edition. >>> Version: 7.5.487 / Virus Database: 269.13.19/1008 - Release Date: >> 9/14/2007 8:59 AM >> >> >
