This content has been marked as final.
Show 6 replies
-
1. Re: Problem with native query
terramekh Aug 22, 2006 7:19 AM (in response to terramekh)Also I've tried the same code on PostgreSQL 7.2. The same deal... Man... I'm gonna get mad %(
-
2. Re: Problem with native query
terramekh Aug 22, 2006 8:44 AM (in response to terramekh)More facts:
entityManager.createNativeQuery("select cast (test as VARCHAR(3)) from test_table where id = :id");
also works properly... -
3. Re: Problem with native query
terramekh Aug 22, 2006 8:46 AM (in response to terramekh)And another one: CHAR(n) doesn't seem to work too...
-
4. Re: Problem with native query
alexg79 Nov 26, 2006 12:29 PM (in response to terramekh)Variable placeholders are not supported in native queries.
-
5. Re: Problem with native query
maxandersen Nov 26, 2006 1:04 PM (in response to terramekh)not true. both ? and named parameters are supported.
-
6. Re: Problem with native query
lwpro2 May 8, 2012 2:14 AM (in response to terramekh)seems native query treat char as Character.
solution1: use query.unwrap(SQLQuery.class)
solution2: simply cast the column to varchar, cast(LAE.legalAccessEntityCode as varchar(12))