pasha wrote:
don't forget that LIMIT 9 does not work on all DBMSs
Hey again (sorry for so many questions).
I'm getting this error...
60297 [http-8080-Processor24] ERROR org.hibernate.util.JDBCExceptionReporter - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 9 and weatherdat0_.affiliateId='ca_nb_fredericton' order by weatherdat0_.i' at line 1
ERROR:org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.adsmack.smacklet.weather.domain.AffiliateWeather.WeatherDataList#ca_nb_fredericton]
I am currently using MySQL (latest version) and if I was to type "Select * from weatherdata wd where affiliateId="ca_nb_fredericton" order by id desc limit 9" -- I would get exactely what I need, but when doing it through hibernate, I get that error... any idea why that may be happening? Do I need a more up to date .jar file perhaps?
Thanks again
--LD