On 15/08/2016 4:38pm, Andrus Adamchik wrote: > >> On Aug 14, 2016, at 4:39 PM, Hugi Thordarson <h...@karlmenn.is> wrote: >> >> Hi all! >> Does Cayenne’s EJBQL support LIMIT expressions? I see I can set a fetch >> limit on an EJBQLQuery, but it seems that this will just limit the size of >> the resultset generated by the query, not the SQL generation (resulting in >> huge execution times for large queries). >> >> Cheers, >> - hugi > > Yeah, the way it is implemented is not particularly efficient. The limit > functionality is external to the syntax, and hence doesn't make it to the > generated SQL. We can either patch EJBQL, or wait for the bright future when > EJBQL and ObjectSelect and made one :) > > Andrus
Out of interest Hugi, why are you using EJBQL? Is this legacy code moved to Cayenne and this was the easiest way forward? Or are there features of Cayenne's incomplete EJBQL implementation you like better than the other SQL Template or ObjectSelect api? Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A