I have the following query (PostgreSQL) that I'd like to convert to
ICriteria:

SELECT
  t.theater_id as tid,
  round(cast (sqrt(pow(69.172 * (latitude-:lat(float)),2) +
        pow(50.8750184225293 * (t.longitude-:lng(float)),2)) as
numeric),2)
     as distance
FROM
  theater t

Is it possible to write this query using QueryOver/ICriteria? Or am I
better off projecting this as SQL? Ideally, I'd like for this to work
in both dev/production with developer tests using SQLite and
production using Postgres. Some of the functions I'm using aren't
supported on SQLite, which is causing problems for me.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to