Hibernate version
hibernate v3.2
]Mapping documents:
<hibernate-mapping>
<sql-query name="my.Query1">
select * FROM TEST where ID = :ID
</sql-query>
<sql-query name="allFields" >
<return-scalar column="tid" type="string" ></return-scalar>
<return-scalar column="tname" type="string"></return- scalar>
select id as tid, name as tname FROM TEST
</sql-query>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
org.hibernate.Session ses = sessionFactory.openSession();
Transaction tx = ses.beginTransaction();
Query q= ses.getNamedQuery("allFields");
List lst = q.list();
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Oracle9i
The generated SQL (show_sql=true):
/*Hibernate : named query allFields */ select id as tid, name as tname FROM TEST
Now my problem is the it only gives me returned records bt it doesnt give me coulumn name.
for ex in the above case, tid and tname is the coulum name bt in the output , it doesnt give me couldm name as in the result set.
so is there ne solution for the same?
waiting for the positive reply.... or mail me on
shethap@yahoo.com
Regards