Re: count(*) with parameter

2010-04-18 Thread Florin T.PATRASCU
or something like this: ... String sql = "select count(*) as total_clicks from user_clicks " + " where user_id = #bind( $userId, 'VARCHAR')"; SQLTemplate sqlTemplate = new SQLTemplate( UserClick.class, sql); sqlTemplate.setParameters(params); //params defined elsewhere sqlTempl

Re: String-with-number sort and insert order preservation

2010-02-02 Thread Florin T.PATRASCU
Hi Ĺ abo, I don't have a pure Cayenne answer, but in case you can add an extra field to your table, then you can write a simple program to convert your IP addresses to numbers and save the numbers to the newly added field. Here is a simple Java method I am using to convert IPV4s to a long:

Re: Cayenne 3.0M5 released today

2008-12-16 Thread Florin T.PATRASCU
Congratulations! We moved from Hibernate to Cayenne and never look back since then. Awesome project and awesome team! V/r -florin -- 2008.12.16 Tuesday, 08:25 AM On 15-Dec-08, at 09:21 , Aristedes Maniatis wrote: Milestone 5 marks another set of major achievements for the Cayenne ORM

Re: [ANN] Cayenne 1.2.4/2.0.4 released

2007-10-13 Thread Florin T.PATRASCU
Congratulations for the new release! On 13-Oct-07, at 01:56 , Andrus Adamchik wrote: I am glad to announce a new release from the stable branches. Upgrade is recommended, as the new release contains some important fixes, including some runtime race conditions. More details can be found he

[ANN] Cayenne support is available now in JPublish too

2007-10-12 Thread Florin T.PATRASCU
Hi there, We just added Cayenne support to our Java web framework called JPublish (http://code.google.com/p/jpublish/) The implementation is very simple and efficient, a JPublish module and a lot of valuable info from Cayenne's user list. The Click framework was also used as a very good e

Re: Best practices for using Cayenne's ObjectContext in a web framework?

2007-09-26 Thread Florin T.PATRASCU
g. Some people who use a session context and never care to preserve the state between requests, may want to rollback (or commit?) the session context at the end of the cycle. Not sure how widespread such pattern is. Andrus On Sep 23, 2007, at 9:38 PM, Florin T.PATRASCU wrote: Hi Andr

Re: Best practices for using Cayenne's ObjectContext in a web framework?

2007-09-23 Thread Florin T.PATRASCU
th a Filter binding the DataContext to request thread. Please see the attached example. regards Malcolm Edgar http://click.sourceforge.net On 9/23/07, Florin T.PATRASCU <[EMAIL PROTECTED]> wrote: Hi there, I am trying to add Cayenne support to the JPublish web framework ( http://code

Best practices for using Cayenne's ObjectContext in a web framework?

2007-09-23 Thread Florin T.PATRASCU
Hi there, I am trying to add Cayenne support to the JPublish web framework (http://code.google.com/p/jpublish/) and being very new to Cayenne I would like, if possible, to find which is the best practice for obtaining and using the OC? I browsed the threads here and most of the informatio