Hi, I have the following table on Oracle:
test_table:
something char(10)
ID char(12) not null
Then I tried executing the code:
String result = (String)session.createQuery("SELECT test.something FROM com.blah.test AS test where test.ID = :var").setString("var","hello").uniqueResult();
There were no exceptions, but I get a null value for the string result.
However, if I hardcoded the "hello" in the SELECT statement (SELECT test.something FROM com.blah.test AS test where test.ID = 'hello'"), it will return the result.
Does anyone know why?
Thanks.
|