Just mail it to me and I will include it in the next release with acknowledgements to the authors.
Cheers, Geoff On 18/02/2012, at 1:07 AM, George Christman wrote: > Well guys, the good news was I was able to get the treegrid to load for the > first time this morning, still a few bugs calling the child nodes, however > I should be able to fix that pretty easily tonight. > > So what is the final query recommendation? Are we sticking with HQL, or are > we converting it to use the Criteria API? > > Once completed, what would I need to do to submit the code to JumpStart for > others to use? > > Thanks Lance/Thiago > > On Fri, Feb 17, 2012 at 7:38 AM, Thiago H de Paula Figueiredo [via > Tapestry] <ml-node+s1045711n5492339...@n5.nabble.com> wrote: > >> On Fri, 17 Feb 2012 10:14:31 -0200, Lance Java <[hidden >> email]<http://user/SendEmail.jtp?type=node&node=5492339&i=0>> >> >> wrote: >> >>>> I'm talking about this: >>>> >>>> "where c1.id in (" + questions + ") " >>> I'm hoping you realise that questions is just a comma separated string >> of >>> question marks eg "?, ?, ?" so it's SQL injection safe. >> >> I haven't thought of that, but there's a better way of doing that anyway. >> >> If you start building HQL queries by string concatenation, you're either >> overlooking the Query.setParameterList() method or the the very nice and >> useful Hibernate's query by criteria API (which is very good but many good >> >> developers don't even know it exists, and that's a huge shame because of >> the ugly workarounds to create dynamic queries in HQL). >> >>>> He should use Query.setParameterList() instead. >>> Cool, I didn't know about this. I'm assuming hibernate generates the "?, >> >>> ?, ?" under-the-hood to achieve this. >> >> Probably . . . >> >>> I'm thinking that this might be (ever so slightly) slower than using >>> setLong() for each as it would either be doing a potentially ambiguous >>> setObject() under the hood or would be doing lots >>> of instance of's to determine the parameter type. It would be nicer if >>> hibernate had a method setLongs(String name, long[] values). >> >> The time spent by Hibernate doing that will be completely insignificant >> when compared with the time spent doing the search itself. Premature >> optimization? :P >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=5492339&i=1> >> For additional commands, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=5492339&i=2> >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://tapestry.1045711.n5.nabble.com/Tapestry-TreeGrid-tp5462126p5492339.html >> To unsubscribe from Tapestry TreeGrid, click >> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5462126&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTQ2MjEyNnwxNjMyOTYxMjA3> >> . >> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > > -- > George Christman > www.CarDaddy.com > P.O. Box 735 > Johnstown, New York > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Tapestry-TreeGrid-tp5462126p5492592.html > Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org