Hi Hibernat0rs,
I'm new here... great forum, awesome framework!
Database: Postgresql 8.4 + Postgis 1.4.0
Using Hibernate Spatial Release 1.0-M2
How can I use a named query parameter in an SQL string?
Example SQL-query:
Code:
SELECT {c.*}
FROM country c
WHERE
c.boundingbox && ST_GeomFromText('MULTIPOINT(:swlng :swlat,:nelng :nelat)',4326)
Now if I try to set the named parameters in my code, Hibernate trows an exception saying that it can't find the query parameters in the sql command.
I found out that it can't find the parameters because they are between the single quotes (part of the string).
Independent from my example, is there a way to escape the query parameters located between single quotes, so hibernate can find the parameters?
Regards
humppa!