Hi David,
Thank you for responding to my question.
Here is the query:
<sql-query name="bhanu >
<![CDATA[
select status,
unit, dr_amount, cr_amount, cr_itm_cnt, dr_itm_cnt, aprvid1, aprvid2, comment
from transaction where trasaction_id= ? AND updt_by_ts < ?
ORDER BY trasaction_id ASC, updt_by_ts DESC
FOR READ ONLY
]]>
</sql-query>
In the above query - status,unit, aprvid1, aprvid2,comment are string fields. If I execute the query against the database for above fileds correct data is coming out...
but when I execute the query through the hibernate code, I get only the first character ...
Executing the query in the as below:
public List getTransactions(String trannum, Date date){
List tranlist=new ArrayList();
Query query = getSession().getNamedQuery("bhanu");
query.setLong(0, new Long(trannum));
query.setTimestamp(1, date);
tranlist=query.list();
}
Can you be more clear what do you mean by "attaching the Java object to the query"?
Please help me understand why that's happening...
thank you,
bhanu
>