Hi,
I am retreiving values from a database based on a parameter using hibernate and displaying the data using
struts.
The query i am using is
return session.createQuery("select a from Users as a where a.USERNAME like ?").setString(0,userName).list();
The code of the display page is
<s:iterator value="userList" status="userStatus">
<s:property value="USERNAME"/> |
<s:property value="ID" /> |
</s:iterator>
The above code works fine. When i try to display only the username, using
select a.USERNAME from Users as a where a.USERNAME like ? in the query, i don't see any records.